![]() |
API Documentation
|
POST - used to request for an access token (and optional refresh token).This API endpoint serves a number of purposes:
This API endpoint supports the following Covata user roles (as described in the Covata Platform Administrator's Guide):
The Covata Platform's resources available to one of these Covata users (above) is determined by the access token passed in the header of requests to this endpoint.
The request's header requires HTTP Basic authentication, whose value is the string value of your application's client ID and client secret (separated by a colon) and encoded with Base64.
Note: The client ID and client secret values constitute your application's client credentials, which would have been generated when your application was registered on the Covata Platform. Also see Configuring client applications in the Covata Platform Administrator's Guide for more information.
For example, encoding:
exampleClientApplication:exampleClientApplicationSecret ZXhhbXBsZUNsaWVudEFwcGxpY2F0aW9uOmV4YW1wbGVDbGllbnRBcHBsaWNhdGlvblNlY3JldA==Therefore, the HTTP Basic authentication header would be:
Authentication: Basic ZXhhbXBsZUNsaWVudEFwcGxpY2F0aW9uOmV4YW1wbGVDbGllbnRBcHBsaWNhdGlvblNlY3JldA==The request also requires form URL-encoded data in the body:
Content-Type: application/x-www-form-urlencodedThe following required parameter must be sent in the body of the request (as form URL-encoded data):
password for the password grant type authorization_code for the authorization code grant type. In addition to the required parameters above, some of the following parameters are also required based on the grant type used and should be included in the body of the request (as form URL-encoded data):
password ( Required when using the password grant type ) - The password of a Covata user's credentials (acquired through your application).
Example (using the password grant type):
A JSON-formatted response containing the following members:
bearer. expires_in - The number of seconds remaining for the access token's validity (i.e. from the time this response was issued).
Example: