Share

Obtain an access token to use APIs

You must obtain an access token to be able to run APIs. There are several ways to do this depending on how you intend on running APIs. For instance:

Important:
  • An access token is only valid for one hour. You must obtain a new access token after your current one expires.
  • You should define the necessary scope of permissions (data:read, data:write, data:create, etc.) when obtaining your access token. The full scope of each API can be found in Swagger.
  • There is a rate limit for the token endpoint. For example, Oxygen has a rate limit of 500 requests per minute so consider this when creating API scripts.

An example is shown here of the command you might run:

curl --location 'https://developer.api.autodesk.com/authentication/v2/token' \
--header 'content-type: application/x-www-form-urlencoded' \
--header 'authorization: Basic ${Base64(<your_client_id>:<your_client_secret>)}' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'scope=data:read data:write data:create' 

where ${Base64(<your_client_id>:<your_client_secret>)} is your client ID and client secret converted into a Base 64 string.

The full process for obtaining an access token is described in detail here and here.

Was this information helpful?