document-understanding
latest
false
  • Getting Started
    • Overview
      • Using The Credentials for HTTP Requests
      • Using The Credentials in Swagger
    • Limits and Quota
  • Examples Using the Document Understanding™ Cloud API
  • Licensing
  • Troubleshooting
UiPath logo, featuring letters U and I in white
Document Understanding API Guide
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated Nov 21, 2024

Using The Credentials for HTTP Requests

After creating the External Application, you can use it in your implementation. First, go through the Authentication procedure, using an Access Token. Here are the steps you need to follow:

  • Get an access token for the AppId and AppSecret received when configuring the External Application.
  • Use the access token as a request header.

Get an Access Token

To access the application scope, confidential applications use the clientID and clientSecret in the call to the `POST https://cloud.uipath.com/identity_/connect/token` endpoint. This returns the access token.

Request example:

curl --data-urlencode "scope=Du.Digitization" 
--data-urlencode "client_id={app_id}" 
--data-urlencode "client_secret={app_secret}" 
--data-urlencode "grant_type=client_credentials" https://cloud.uipath.com/identity_/connect/tokencurl --data-urlencode "scope=Du.Digitization" 
--data-urlencode "client_id={app_id}" 
--data-urlencode "client_secret={app_secret}" 
--data-urlencode "grant_type=client_credentials" https://cloud.uipath.com/identity_/connect/token

Response example:

{ 
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjgwM", 
"expires_in": 3600, 
"token_type": "Bearer", 
"scope": "Du.Digitization.Api" 
}{ 
"access_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6IjgwM", 
"expires_in": 3600, 
"token_type": "Bearer", 
"scope": "Du.Digitization.Api" 
}

Use the access token

Use the access token by setting it as the Authorization header for each of the requests made to the REST APIs. The access token allows you to call the APIs that required the selected scopes, until the token expires (one hour). After that, you need to obtain a new access token using the app_id and app_secret.
  • Get an Access Token
  • Use the access token

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.