Authenticate an Admin API application
Use this example to authenticate an Admin API application and obtain the auth token required by later Administration API requests.
To perform this action, the first step is to submit a POST request to the Admin application. This is the Admin application created on your Identity as a Service account. The URL address of the Admin application includes your Identity as a Service account URL. The format of the URL is:
https://<domainname>.<region>.trustedauth.com/api/web/v1/adminapi/authenticate
For example:
https://example.us.trustedauth.com/api/web/v1/adminapi/authenticate
The body of this request should contain the JSON object with an Application ID and Shared Secret. This JSON file was generated during creation of Admin Application on Identity as a Service. For example:
{
"applicationId": "d3737e0f-4d8e-431c-b1d8-cd17ad4d633d",
"sharedSecret": "randomSharedSecret"
}
An API response is received if the call is successful . For example:
{
"authToken": "GLb6JWz966gCayVNw4lZSSKV6W3PGgsJZ4CagZjoZNMaa2Me7F5OX+CKOVx8sOXsBEdLemVEruixXoaVsjQc1j+GPBy5Qn+KlilA9GXrSEQujsmfiJono3Gta7Uc8b3VUkEBvU193UqWPtmW1NXsSnPV2Z9B2AjZT17zNlHAyOvFpOXTI5bkmj6f2cKses6cBem5kLSbGHH9lHBv4JvXBjNxtPf7urAUkFn8cJariZyb0/q/AYqYL9do8nFrPFmSCTjYeNmxuWm5CACRi17K5XSyhZpu979b3i7MQEeOq1Pfjw7WzdKfrSvLJg/qgYeLD4aSOrQu4HAixZSFBmW9RGDxlo0J0Y1uAAy4lR57yG3p6E8H6OcV3Vakso4CT8yHAFH8xmdsUXXfyv9v+hr5QKh+7iVYro8tjjByRzj6XXAOx0vDO2yhpOd4migv33aWlFEhbgxIzNseJ8je6wauST0O+hJ5kKjl5yLBXS3iKhZJZMG2FNcU5pbD7SnUh79OWoCuOsehOM2pDFDPnMEms5ri/y0yaKIZmtz9Poy6KH1BDd+645+xX8iqW4IeqJ3zW8RZtnJgzAkUFeCjuDtbvotIcR45p8ibXF0GWLFAbxzvc5daf21bBV29A33C7mFoX4id44BZJ6OC8fztmthRzR2l0uP04STG0dgRRTNgZpoqKiMczwbOVNDv7ZQeSf/Kh3n2S1O8SZXHZT+zUvPwCLg9mnhOTYEqPjoMlqTZycttFYv3D4hKbU7NzYmFdtGYreaI2rNNue7aOzn+J8BN0j3+ZHkhimfO/ZfhF89Bn02IRzDER1ENdcwBSO8frWeAR+nCy0m4Eg==",
"expirationTime": "2018-05-28T19:07:50.328+0000",
"creationTime": "2018-05-28T18:52:50.329+0000"
}
You must include the auth token value displayed in this response in subsequent API calls. Without it, other Admin API calls will fail.
An error code is displayed if the call is unsuccessful. A different error code is displayed for each type of error.