"Impossible to update authenticatedCustomerId" error for authenticated messaging

I am trying to do authenticated messaging.
I can successfully get token from Genesys API:
https://api.mypurecloud.de/api/v2/webdeployments/token/oauthcodegrantjwtexchange

But, when the chat initialized. I got this error in the websocket downstream data:
Impossible to update authenticatedCustomerId, then the web page looks like this:

My websocket upstream data is:

{
    "deploymentId": "97173f33-d29b-432a-b966-899fecb5d354",
    "token": "a774d5c0-0727-4c6a-9de5-254f6bc6f5d3",
    "mode": 2,
    "journeyContext": {
        "customer": {
            "id": "a774d5c0-0727-4c6a-9de5-254f6bc6f5d3",
            "idType": "cookie"
        },
        "customerSession": {
            "id": "7dd47e55-48ad-4de7-ab2f-c854e7daba7f",
            "type": "web"
        }
    },
    "action": "configureAuthenticatedSession",
    "data": {
        "code": "eyJhbGciOiJSUzI1NiIsImtpZCI6ImM2YTI0NzFjLWEyYjktNGVlNS1iYmE4LTExZTQ2ZDQ1MTBmOSIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJ3ZWJtZXNzYWdpbmciLCJhdXRoX3RpbWUiOiIxNzA1NDM0NjM0IiwiZGF0YSI6eyJkaWQiOiI5NzE3M2YzMy1kMjliLTQzMmEtYjk2Ni04OTlmZWNiNWQzNTQiLCJ1dWlkIjoiYjNjY2JmMGUtM2VjYy00ZmRlLTg2YTgtODAzZGM5NWFjNGRhIn0sImV4cCI6MTcwNTQzNTUzNSwiaWF0IjoxNzA1NDM0NjM1LCJpc3MiOiJ1cm46cHVyZWNsb3VkOndlYm1lc3NhZ2luZy1hdXRoIiwib3JnIjoiMTY0ZTVkOWItNmMwYS00MzI3LWFiNmEtMzAzZGUzYzE1ZGYwIiwic3ViIjoiNGFiMWMwOWEtNzYxOS00NjgwLTk4NTktYWM3MWY5ZjJlMTNiIn0.u59VHNJ410C7CRh_jvw8HbAPmKSsd5a8aYoTUYJusmDgZeXQPJfFCX_PTPTOdaZ_9HSNXhY6iCIIerNNezFgNBj3uqUj_aKjgBHIbZYy6tJ74XgbRVFbGGec7AyJAcRFli0ERZR4Esdcz6cIxiJ8r0ukoH0_Jeo1sG8L7uezcnTcBAoCOwDguSZNc447BtRRXYV_TtuSqU4uH2ZPo7p3oLOnfPDNEGl8sO6N2psu3QAE94aqVATZWYdK4JREnrw9skRBWHr-OvUx1ddFqxmSgSvZTvTkqsRZekLuWDzCr4HCMWRmDUOsrJiAchJmZlPTzcdhXib6aopjXhZEybzz6w"
    }
}

My downstream WS that is responding to above upstream data is:

{
    "type": "response",
    "class": "string",
    "code": 400,
    "body": "Impossible to update authenticatedCustomerId"
}

So what do you think is the issue? Any suggestion? Anything I missed?

Hi,

Thanks for reaching out.

It looks like you're not using the right JWT.
A first authenticated session was successfully configured with a given user (sub attribute in JWT) and linked to a given token (e.g. "a774d5c0-0727-4c6a-9de5-254f6bc6f5d3") that points to the Web Messaging session.
Once configured, authenticated user is tied to the session (hence the token) and cannot be changed.
Then subsequent session configuration requests reference a different user than the one assigned initially.
That is why you get this error message.

If you want to start a new session for a new different (authenticated) user, use a new token in the configureSession request.

If you're not falling in this use case, please let us know.

Hope this helps,

Best regards,
V.P.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.