Getting the API Access Token - Platform - Foundation 24.1 - Foundation 24.1 - Ready - Hyland RPA - external - Hyland-RPA/Platform/Foundation-24.1/Hyland-RPA-Platform/General-Information/Direct-API-requests-with-Postman/Getting-the-API-Access-Token - 2025-04-03

Hyland RPA Platform

Platform
Hyland RPA
Product
Platform
Release
Foundation 24.1
License
To get the API access token:
  1. In the collections tree, right-click New Collection and then select Add Request.
  2. In the name field, enter Get API Access Token.
  3. From the drop-down list, select POST.
  4. In the Enter request URL field, enter the following, replacing {domain_name} with your environment's domain name:
    https://{domain_name}/identity/connect/token
  5. On the Body tab, select x-www-form-urlencoded.
  6. On the Params tab, add the following key/value pairs to the query params:
    • grant_type: authorization_code
    • code: {{code}}
    • redirect_uri: https://{domain_name}/{api_name}/swagger/oauth2-redirect.html

      Replace {domain_name} with your environment's domain name and {api_name} with the API you are targeting (heart, identity, repository, policy, analytics).

    • client_id: API Client’s ID. The ID can be found in the API’s appsettings.json file in  the following locations:
      Heart Client ID
      HeartServer:Swagger:ClientId
      Identity Client ID
      IdentityServer:Swagger:ClientId
      Repository Client ID
      RepositoryServer:Swagger:ClientId
      Policy Client ID
      PolicyServer:Swagger:ClientId
      Analytics Client ID
      Swagger:ClientId
  7. On the Tests tab, as the Tests body enter the following, replacing {api_name} with the API you are targeting (Heart, Identity, Repository, Policy, Analytics)::
    var jsonData = JSON.parse(responseBody);
    pm.collectionVariables.set("{api_name}AccessToken",
    jsonData.access_token);
  8. Click Send.
    Note: The access token will now be in the variable {api_name}AccessToken, with {api_name} being the name of the API you are targeting.
  9. Verify that the status code is 200.
  10. Click Save.