- The client application fetches an initial authorization code from the authorization server (i.e. the Covata Platform).
- The Covata user authenticates themselves to the authorization server (directly).
- The client application submits the authorization code (along with its client credentials) back to the authorization server to retrieve an access token (2).
Registering your application on the Covata Platform
Before developing your application, you should consult your Covata Platform administrator to begin the process of registering your application on their Covata Platform. After agreeing with your administrator on the grant type(s) that your application will implement, your administrator can proceed with your application’s registration process. Once your application is registered, your administrator should provide you with client credentials (a client ID and client secret) to hard code into your application. These credentials are required by the Covata Platform to either ‘authenticate’ or identify your application to the Covata Platform. See Configuring client applications in the Covata Platform Administrator’s Guide for more information.Overview of the OAuth 2.0 process
The following steps outline the Covata API OAuth 2.0 process for authenticating and authorizing your application to access a Covata user’s resources on the Covata Platform:- Authorizing your application (initiating a request for an access token)
- Completing authorization (obtaining the access token)
Authorizing your application
Authorizing your application to a Covata Platform instance begins by initiating a request to obtain an access token from the Covata Platform instance. This request is based on one of the three OAuth 2.0 grant types supported by the Covata Platform (mentioned in the table above). The grant type utilized when authorizing your application is based on a combination of API endpoint andgrant_type URL parameter used in the initial request.
If your request is successful, an access token is returned to your application. Pass this token in subsequent requests to the Covata Platform to perform other interactions and activities.
Currently, only the password grant type is documented. Documentation for the other grant types will be added in the near future.
Using the password grant type
To obtain an access token from the Covata Platform using the password grant type, make aPOST method call/request to the <access-service>/api/oauth/token API endpoint with the following parameters sent as form URL-encoded (i.e. application/x-www-form-urlencoded) data in the body of the request:
grant_type- Use the valuepasswordusername- The email address of a Covata user’s credentials (acquired through your application).password- The password of a Covata user’s credentials (acquired through your application).
exampleClientApplication:exampleClientApplicationSecret
with Base64 results in the value:ZXhhbXBsZUNsaWVudEFwcGxpY2F0aW9uOmV4YW1wbGVDbGllbnRBcHBsaWNhdGlvblNlY3JldA==
Submitting a cURL command like the one above with at least one
being automatically included in the request. Be aware that this header is required for the request to succeed.
-d option results in the following header: Content-Type: application/x-www-form-urlencoded being automatically included in the request. Be aware that this header is required for the request to succeed.

