Consumer Link
consumerLink URL is returned in the response when order is submitted to Human API, it is can be used to launch Task Manager. In Integrated flow where you want user to be redirected back to your workflow or application the callback needs to be appended as a querystring parameter to the consumerLink URL.
Note
The consumerLink URL has a default expiration of 8 hours once generated.
In case the consumerLink URL is expired the user will see an error message and we pass following information to the callback url -
status: error
error: Forbidden
message: The provided Token has expired
Generating consumerLink
In order to generate a new consumerLink you can issue a call to the API’s /consumer-link endpoint, identifying the user by their clientUserId. The request must be authenticated by your client token.
Here is a sample request:
POST /api/v1/resources/consumer-link HTTP/1.1
Host: admin.humanapi.co
Content-Type: application/json
Cache-Control: no-cache
Authorization: Bearer your-client-token
{
"clientUserId":"Policy_001"
}
A successful response will have 200 status code and response body:
{
"consumerLink": "https://todo.humanapi.co/?clientId...",
"clientId": "774b9e333ec3e57b9f86b432be4da21a66901d81"
}
Updated about 2 years ago