Request

Response

    Code Snippets

    This section provides ready-to-use code snippets for User Profile API operations. Each snippet includes request templates, example responses, and complete code examples in multiple programming languages.

    Available Snippets

    SnippetDescriptionLanguages
    REST API Snippets Retrieve OIDC-compliant user information using the REST API /userinfo endpoint NodeJS, Java
    GraphQL API Snippets Query and update core user profile information including personal details, contact information, and profile images NodeJS, Java

    Request Headers

    GraphQL API

    HeaderRequiredDescription
    Authorization Yes Bearer token obtained via OAuth 2.0
    Content-Type Yes application/json
    x-correlation-id No Unique identifier for request tracking and troubleshooting

    REST API (UserInfo)

    HeaderRequiredDescription
    Authorization Yes Bearer token obtained via OAuth 2.0
    x-correlation-id No Unique identifier for request tracking and troubleshooting

    Getting Started

    1. Obtain an access token - Follow Task 1 - Obtain Authorization to get your token
    2. Choose your API - Use GraphQL for flexible queries or REST for OIDC-compliant access
    3. Review the snippets - Each snippet includes request templates and expected responses
    4. Copy and customize - Use the code snippets, replacing placeholders with your values

    Placeholder Reference

    When using the code snippets, replace these placeholders with actual values:

    PlaceholderDescription
    <ACCESS_TOKEN> Your OAuth 2.0 access token
    <USER_ID> The Autodesk user ID to query (GraphQL only)