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
Using The Credentials for HTTP Requests
Document Understanding API Guide
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
andAppSecret
received when configuring the External Application. - Use the access token as a request header.
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/token
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/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 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
.