Platform 6 API authentication
API requests without authentication fail. The following authentication methods are available:
- Basic – Username and password
- Query token – Auth token in query header
- Client – Bearer token
Basic authentication
Overview
Send credentials in the HTTP request Authorization header as a base64-encoded username:password string.
Example
Replace username and password with your credentials:
HTTP request header
For example, if your username is user and your password is pass, the encoded header looks like this:
Basic authentication is only available over SSL.
Validate your credentials
Send a GET request to whoami to confirm you can reach theItential Platform server API and view access associated with your user:
Query token authentication
Overview
Obtain a token by sending a POST request to /login, then pass the token as a query parameter in subsequent requests.
Request a token
Send a POST request to /login with the following JSON payload:
Example
Response
A successful login returns an authentication token:
Use the token
Include the token as a query parameter in subsequent requests:
Validate your token
Replace your-auth-token-here with the token returned by /login:
Client authentication
Overview
Obtain a bearer token by sending a POST request to /oauth/token, then pass the token in the Authorization header of subsequent requests.
Request a token
Send a POST request to /oauth/token with Content-Type: application/x-www-form-urlencoded and the following payload:
Example
Response
A successful request returns the bearer token and its expiration time:
Use the token
Set the access_token value as your Authorization header:
Validate your token
Replace your-access_token-here with the token returned by /oauth/token: