https://support.tethr.com/hc/en-us/categories/115001740967-Developers Developers
https://support.tethr.com/hc/en-us/sections/115003048847-APIs APIs

Token authentication API

New feature: content organization, collaboration and filtering

This article describes a new feature that may not be available to all users. If you don't see this feature and want to learn more, please contact your Tethr admin.
Section only

Token authentication API

All requests are authorized via a OAuth2 bearer token. Requests for an access token should be made with an “client_credentials” grant type. Bearer token will expire after 30 minutes, 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.

Account

Tethr used specific API User account to access the Tethr APIs (your normal Tethr user will not work).  The Tethr API user need to be create by Tethr Support, please send an email to Support@Tethr.com and they will walk you throw the process of setting up an API user, (Note a Tethr user with the Administrator role is required to access the API user secret).  The API user client secret is only valid for 365 day, at which time a new secret will need to be generated.  Tethr support team will reach out to the technical contact on file prior to the secret expiring to remind you that it much be cycled.


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=[ApiUserSecret]&client_id=[ApiUsername]


Sample token request using cURL

curl -k -X POST "https://[INSTANCE NAME].Audio.Tethr.com/Token" -dclient_id=[ApiUsername] -dclient_secret=[ApiUserSecret] -dgrant_type=client_credentials


Response (if the token request is successful)

{
	"access_token": "[TOKEN]",
	"token_type": "bearer",
	"expires_in": 1799
}