Authentication
Setting up access to the Sypht API
Last updated
Setting up access to the Sypht API
Last updated
This guide covers the setup and configuration of access credentials for working with the Sypht API.
API requests with Sypht are authenticated using the industry-standard OAuth2 authentication protocol. This authorization flow has three basic steps:
Obtain your Client ID and Client Secret from the Sypht admin console
Generate a temporary access token via the authentication endpoint
Supply this token alongside subsequent API requests
Tokens are generated on demand and should be reused by API Clients for up-to the 60 minute token expiry limit. Tokens can then be regenerated as required for long-running tasks.
API Credentials generated before the 16th June, 2020 are marked as legacy credentials in the Sypht administration console. These credentials may only used with the legacy authentication endpoint.
To access the Sypht API, first obtain a credential pair from the company administration console.
Within the Sypht application, open the settings cogs and select "My API Credentials".
An API Credential pair is generated by default on all accounts. You may create one or more alternative credential pairs, expire old credentials or rotate secrets from this screen.
Access tokens are obtained by sending a POST request to the authentication endpoint (https://auth.sypht.com/oauth2/token) with your encoded client ID and secret.
The following python sample function returns an authentication token given a client ID and secret.
Subsequent requests to the Sypht API are authenticated by supplying the generated access token in the Authorization
header in the format Bearer <accesstoken>
The following python sample function constructs an authenticated request to return results for an uploaded file given the file_id
and access_token
.
These authentication examples are adapted from the open-source Sypht Python Client on GitHub.
We maintain API clients and code samples in a variety of languages including:
See the sypht-team repository for a full listing. Contributions of functionality, language support or documentation are always warmly welcomed!