Access Authorization¶
In order to use the NLU API, it is necessary to use one of the authorization modes indicated in this section. The access authorization field must be included in all commands.
Authorization with NLU Key¶
In this case, authorization is done through an access key called the NLU Key, which is generated and provided by CPQD.
Every request to the NLU API must include the header parameter nluKey containing this key, as shown in the example below:
curl -X 'GET' '{NLU_HOST}/nlu/v1/agents' \
-H 'accept: application/json' \
-H 'nluKey: 63f780f6ecf79c0ee4970aa7.7395fb847ee56bf70ffc590a'
Authorization with JWT¶
In this case, authorization is done through a JWT token generated by the CPQD Licensing Server. The company should provide the access link to the licensing server and the login to be used. By logging into the platform it will be possible to obtain the token.
Every request to the NLU API must include the access token using the Authorization
header parameter, as shown in the example below:
curl -X 'GET' "${NLU_HOST}/nlu/v1/agents" \
-H 'accept: application/json' \
-H “Authorization: Bearer eyJhbGciOiJIUzUxMiJ9...fvKGlImj_jN5oACxg”