Token authentication API
All requests are authorized via a OAuth2 bearer token. Requests for an access token should be made with an “authorization_code” or “client_credentials” grant type. Bearer token will be used and expire after a few hours, and will need to be refreshed. Expiration times will be returned with the token request, and represented in seconds from the time the token was issued.
Example token request
POST https://[INSTANCE NAME].Audio.tethr.com/Token HTTP/1.1 Content-Type: application/x-www-form-urlencoded Content-Length: 124 Expect: 100-continue Connection: Keep-Alive grant_type=client_credentials&client_secret=[ApiUserPassword]&client_id=[ApiUsername]
Sample token request using cURL
curl -k -X POST "https://[INSTANCE NAME].Audio.Tethr.com/Token" -dclient_id=[ApiUsername] -dclient_secret=[ApiUserPassword] -dgrant_type=client_credentials
Response (if the token request is successful)
{ "access_token": "[TOKEN]", "token_type": "bearer", "expires_in": 1799 }
Tip: All date and times must be in ISO 8601 format.