Authenticate using client credentials
To make requests into Stavvy’s API, you will first need to authenticate with the API and receive an access token. Stavvy’s API uses an OAuth-based authentication flow, in which you exchange a client ID and client secret for an expiring access token. To get a client ID & client secret for your API application, reach out to Stavvy support (support@stavvy.com).
Access tokens are formatted as encrypted JSON web tokens which are valid for 1 hour. If you make a request with an expired token, you will receive a 4xx error. To retrieve a refreshed access token, make another request to this endpoint with your client credentials and you will receive a new token.
Valid access tokens must be passed in the Authorization header of subsequent requests for those requests to succeed.
Header Parameters
- x-forwarded-for X-Forwarded-For
- application/vnd.stavvy-1.0+json
Request Body required
- client_id Client Id required
- client_secret Client Secret required
- 200
- 422
Successful Response
- application/json
- Schema
- Example (from schema)
Schema
- access_token Access Token required
- scope Scope required
- expires_in Expires In required
- token_type Token Type required
{
"access_token": "string",
"scope": "string",
"expires_in": 0,
"token_type": "string"
}
Validation Error
- application/json
- Schema
- Example (from schema)
Schema
detail object[]
Array [loc object[] required
Array [- anyOf
- MOD1
- MOD2
stringinteger]msg Message requiredtype Error Type required]
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}