Skip to content

Auth (1.0.0)

The Auth API provides access to other Optoro APIs using the OAuth 2.0 client credentials flow. Optoro's Client Success team will provide the credentials used when requesting an access token. The access token returned from the oauth/tokens endpoint will be used in subsequent requests to Optoro APIs.

Download OpenAPI description
Languages
Servers
Mock server
https://developer.optoro.com/_mock/openapi/auth/openapi
Production
https://auth.optiturn.com
Sandbox
https://auth.sandbox.optiturn.com

Fetch Token

Request

Returns an OAuth 2.0 access token and related metadata. Tokens should be used in subsequent requests to Optoro APIs.

Bodyapplication/jsonrequired
grant_typestringrequired

The name of the OAuth flow used to create a token. Use 'client_credentials'.

client_idstringrequired

Identifier used to authenticate. Obtained from Optoro's Client Success team.

client_secretstringrequired

Secret used to authenticate. Obtained from Optoro's Client Success team.

curl -i -X POST \
  https://developer.optoro.com/_mock/openapi/auth/openapi/oauth/token \
  -H 'Content-Type: application/json' \
  -d '{
    "grant_type": "string",
    "client_id": "string",
    "client_secret": "string"
  }'

Responses

An OAuth 2.0 bearer token and related metadata.

Bodyapplication/json
access_tokenstring

A token that can be used to authenticate with other Optoro APIs.

token_typestring

The access token type, always "Bearer".

Value"Bearer"
expires_ininteger

Time in seconds after which the token will expire.

scopestring

Space-delimited set of scopes for which the token is valid.

created_atinteger

The creation time of the token in seconds since epoch.

Response
application/json
{ "access_token": "G0ybScDl_7CA3tWVou", "token_type": "Bearer", "expires_in": 90000, "scope": "read write", "created_at": 1656518368 }