Request

Response

    REST API Error Handling

    The REST API (OIDC UserInfo endpoint) uses standard HTTP status codes to indicate success or failure. This follows traditional REST conventions where the HTTP status code itself indicates the result.

    HTTP Status Codes

    StatusDescription
    200 Success. Response body contains user information.
    400 Bad request. The request was malformed or invalid.
    401 Unauthorized. Access token is missing, invalid, or expired.
    403 Forbidden. The token lacks required scopes or permissions.
    404 Not found. The user associated with the token does not exist.
    429 Too many requests. Rate limit exceeded.
    500 Internal server error.
    502 Bad gateway. API is temporarily unavailable.
    503 Service unavailable. API is under maintenance.
    504 Gateway timeout. Request took too long to process.

    For a complete list of HTTP status codes used across Autodesk Platform Services, see Authentication Error Handling.

    Success Response

    A successful request returns HTTP 200 with the user’s profile data:

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
      "sub": "ABC123XYZ",
      "name": "John Doe",
      "given_name": "John",
      "family_name": "Doe",
      "email": "john.doe@example.com",
      "email_verified": true,
      "picture": "https://images.profile.autodesk.com/<hash>/x120.jpg?t=<generated-token>",
      "locale": "en-US",
      "updated_at": 1699900000
    }
    
    Show More

    Common Error Responses

    401 Unauthorized

    Returned when the access token is missing, invalid, or expired. See Authentication Error Handling for detailed authentication error codes.

    How to fix: Obtain a new access token using your OAuth 2.0 flow.

    403 Forbidden

    Returned when the token is valid but lacks the required scopes.

    How to fix: Request a token with the openid and profile scopes.

    429 Too Many Requests

    Returned when you’ve exceeded the rate limit.

    How to fix:

    • Check the Retry-After header for when to retry
    • Implement exponential backoff in your application
    • See Rate Limits for limit details

    500 Internal Server Error

    Returned when an unexpected error occurs on the server.

    How to fix: Retry the request after a short delay. If the error persists, contact support with the request details.

    Best Practices

    1. Always check the HTTP status code before parsing the response body
    2. Handle 401 errors by refreshing your access token
    3. Implement retry logic for 429 and 5XX errors with exponential backoff
    4. Log error details including status code and error description for debugging

    See Also