{
"message": "Failed to identify user for token: c062d4f61bfddd0611ba4a3de5e488be deploymentId: afead3f5-70e7-4730-ae2e-1b70a9e46f0a",
"code": "unauthorized",
"status": 401,
"contextId": "995eebaf-47f8-47c4-9094-9abe1be8a2b7",
"details": [],
"errors": []
}
I got above error when calling "https://api.mypurecloud.de/api/v2/webdeployments/token/oauthcodegrantjwtexchange" to exchange authCode for token for production Genesys cloud deployment.
Here are 2 important facts:
-
But this request is a success for dev deployment ID. The following difference between dev and prod are carefully examined and they are all correct: client id, client secret, deployment id, and discovery URI
-
I use curl to make request for production Genesys development and it is a success. In CURL request, I didn't provide
journeyContext
in POST json payload. If I do, this request will fail.
curl -X POST -H "Content-Type: application/json" \
-d '{
"deploymentId": "afead3f5-70e7-4730-ae2e-1b70a9e46f0a",
"oauth": {
"code": "0ac6db5f-52ff-42c1-88b0-18d9e095abc8",
"redirectUri": "https://stage-app.spotnana.com/"
}}' \
https://api.mypurecloud.de/api/v2/webdeployments/token/oauthcodegrantjwtexchange
Above CURL will successfully return jwt token for production since I didn't put journeyContext
in payload. If I do, the request will fail with the error above.
What do you think could be problem?
A related thread is here, but this bug seems solved: Integrate Messenger with Okta for identity management - #6 by vpirat