Get a token
Exchange your organization’s public key and secret key for a token withPOST /token/create, which needs no token itself. You find the pair in the SyncWords dashboard, or
receive it from your SyncWords contact (Get access). The URLs
are those of Environments.
200
401 {"message": "Invalid login details", "code": "invalid_credentials"}.
The answer has the Live API’s field names, so a client that creates its token with the Live API’s
POST /v2/token/create can switch to this URL and change nothing else; a token from either works
on both APIs.
Creating a token is not counted against your rate limit.
One key pair refused 60 times in a minute is answered 429 until the minute is over.
The token belongs to the organization, not to a person, so projects created with it are the
organization’s. Keep the key pair on your servers: anyone holding it can create tokens.
Token lifetime
expires_in is the token’s lifetime in seconds. An answer without it is a token that does not
expire by age.
Do not build on the number either way. Handle expiry the simple way: when any call answers 401,
create a new token and repeat the call. The
monitoring loop and the
automation example do exactly that.
Creating a token does not revoke earlier ones; each stays valid until it expires.
Check what a token can do
GET /whoami names the account behind the token and says whether VOD Express is enabled for it:
When authentication fails
Signing in from a SyncWords app
SyncWords’ own web applications sign their users in another way, in the sameAuthorization
header. Integrations always use API tokens.