Get a TokenΒΆ

The first step to accessing any CAS endpoints is to create an access token which will be sent with every request and will authenticate the API call. For the purposes of this quick start guide, it is assumed that you have been provided with a unique client id and secret. If not, or for more information on access tokens, then please read the Authentication section.

Once you have the client id and secret, you can now make a POST http call to the token endpoint such as the following curl example: As this is a quickstart guide, we will be accessing the UAT environment, and not production. For the full list of URLs please see Environments.

curl -X POST \
  https://identity.uat.us-cas.ipreo.com/connect/token \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip' \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Host: identity.uat.us-cas.ipreo.com' \
  -d 'grant_type=client_credentials&client_id=<client_id>&client_secret=<client_secret>'

You must however replace <client_id> with your unique client id, and <client_secret> with the secret you have been provided. And example body (not real) would be:

-d 'grant_type=client_credentials&client_id=api-fake-test.client&client_secret=858b8c39-a389-4d30-ad13-a231010b8268

This call will respond with a payload that looks something like the following. Be aware that this token expires after 20 minutes, and after that you will need to obtain a fresh token by making the call again.

{
    "access_token": "eyJhbGciOiJSUzI1NiIsImtaCofFDjY1RTg1M0NDRkZBOEY4MKSWUND6jAxNDU0Nzc1ODMzRjE0MDU2N0YiLCJ0eXAiOiJKV1QiLCJ4NXQiOiJaZWhUelAtby1CYXZfR0FVVkhkWU1fRkFWbjgifQ.eyJuYmYiOjaksuhenjAzMDUsImV4cCI6MTU2NDY2MTUwNSwiaXNzIjoiaHR0cHM6Ly9jYXMtaWRlbnRpdHkuZGVtby5pcHJlby5jb20iLCJhdWQiOlsiaHR0cHM6Ly9jYXMtaWRlbnRpdHkuZGVtby5pcHJlby5jb20vcmVzb3VyY2VzIiwiZGVhbHMtcmVhZCIsInBlcm1pc3Npb25zLXJlYWQiLCJzb2NrZXRzLXJlYWQiXSwiY2xpZW50X2lkIjoiYXBpLWZyYW5rbGluLXRlbXBsZXRvbi5jbGllbnQiLCJmaXJtX2lkIjoiMzk1NDY1Iiwic2NvcGUiOlsiZGVhbHMtcmVhZCIsInBlcm1pc3Npb25zLXJlYWQiLCJzb2NrZXRzLXJlYWQiXX0.lynLsCN_nXK_5tEcSWWrQnsarCMz9ftH2J_S-3eHKIRAu5ldPBUd6L1mRby9s3kCafDoLNKZVjO_pW8ENk3g17JwHWssZE3NTu9JBD2aUddZye11ow4mxU9xxUaZHG7sBetcix1XjKegJqbpgWfvcOmQ6gJMPSSzt5FBVQ8RIXH4kuB4Tvv4WwSIOv-NNxIsFM58ih9NAGfgnXdd3CaWYW_jWwZM6QDRc4yfZDufukztGw5MNi0-jsYFoSy3CBeglMpvKqxme-o1HfWYGg2ihR6-WmOvZmee4HISnemXTz9NHfOJTlgj5d8qj8t4534tkfxZGAzPH57S1UqGaZpjw",
    "expires_in": 1200,
    "token_type": "Bearer"
}