Obtain an Access Token

To obtain an access token, you must send a request to the dStor Developer Token endpoint. The request should include your API key and the appropriate authentication parameters.

Note:

The endpoint for the Testing environment is:

https://api.testnet.dstor.cloud/v1/dev/temp-token

The endpoint for the Production environment is:

https://api.dstor.cloud/v1/dev/temp-token

To acquire a temporary token with an API key, send a GET request to the following endpoint: https://api.dstor.cloud/v1​/dev​/temp-token

You will need to add the following as headers:

"api-key": "your-api-key" // required (64 characters)
"x-expiration": 1664349827 // optional, defaults to one year

Below are code snippets to use for the dStor Testing environment.

curl --location 'https://api.testnet.dstor.cloud/v1/dev/temp-token' \
--header 'api-key: 5xikF8a5wcJeqVrtQE8OffKvtR9qaRxPXXJAedhIiNFWJbNsGqsdPfJ5eDYY7n92' \
--header 'x-expiration: 1677336539'

Below are code snippets to use for the dStor Production environment:

curl --location 'https://api.dstor.cloud/v1/dev/temp-token' \
--header 'api-key: 5xikF8a5wcJeqVrtQE8OffKvtR9qaRxPXXJAedhIiNFWJbNsGqsdPfJ5eDYY7n92' \
--header 'x-expiration: 1677336539'

Swagger

The parameters and responses can be found here: https://api.testnet.dstor.cloud/v1/docs/index.html#/Token/get_v1_dev_temp_token

Your temporary access token identifies you to the api and allows you to make requests to dStor.

Last updated