/api/v0/oauth/token

When valid Client credentials are submitted, provides a Bearer token that can then be used with other API calls.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Spreetail uses a simplified “Client Credentials” flow which uses a Client ID combined with a Client Secret that returns a access token. In our case, we return a JWT to be used as a Bearer Token.

This is a POST request that looks like this:

curl --request POST \
  --url 'https://{ApiDomain}/api/v0/oauth/token' \
  -H 'Content-Type: multipart/form-data' \
  -F 'GrantType=client_credentials' \
  -F 'ClientId={your client ID}' \
  -F 'ClientSecret={your client Secret} \

Which should respond with an object:

{
  "accessToken":"2YotnFZFEjr1zCsicMWpAA",
  "tokenType":"bearer",
  "expiresIn":3600
}

You can then use the “access_token” to call any secured endpoints:

curl --request GET \
  --url https://{ApiDomain}/api/v0/apiMethodCall \
  --header 'Authorization: Bearer {access_token}'
Body Params
string
required
string
string
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Unauthorized

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json