Chat session cannot be routed to chatbot agent using Conversation API updateAgentStatus


4 Kommentare

  • Greg Katechis
    Zendesk Developer Advocacy

    Hi Marius! A chatbot needs a dedicated agent seat in order to function, so you will need to associate the bot with a "bot agent". Once you associate the credentials with that agent, you'll be good to go.

  • Marius Wilhelmi

    Hi Greg,

    thanks for your swift reply.

    I already have a dedicated Zendesk agent licensed assigned to my chatbot. I am not yet sure what you mean exactly by "associate the credentials with that agent". I am using the "Client credentials grant type" as described on this page:

    It says on this page about the password grant type: This grant type is only supported on Chat-only accounts. It's not supported on Chat+Support accounts. Since we have a Chat+Support account, the password type does not seem to be possible. Is this the workflow you are referring to? I do not see though where I associate the credentials with the chatbot agent.

  • Marius Wilhelmi

    I have now tried to create another Chat API token while signed in with the chatbot agent credentials. Interestingly, one agent cannot see the tokens of another agent, so even when I am signed in as the Zendesk owner, I cannot see a token created by the chatbot agent, which I find a bit worrisome in regards to missing transparency.

    However, the client id and client secret from the chatbot account return a 401 - invalid_client error. I switched the tokens several times and verified that the one created from my own Zendesk account work and the other one doesn't. Here is btw. part of the code I used for authorization:

    const zendeskSupportAuth = require(path.resolve(__dirname, "./zendesk_support.json"));

    const zendeskChatClientId = zendeskSupportAuth.chat_client_id;

    const zendeskChatClientSecret = zendeskSupportAuth.chat_client_secret;

    const zendeskSubdomain = zendeskSupportAuth.instance_uri_sandbox;

    const url = '';

    const data = {

    grant_type: "client_credentials",

    client_id: zendeskChatClientId,

    client_secret: zendeskChatClientSecret,

    scope: "read write chat"


    const formData = encodeFormData(data);

    .set('Content-Type', 'application/x-www-form-urlencoded')


    .then(res => {

    console.log('ZENDESK CHAT AUTHORISATION SUCCESSFUL ' + JSON.stringify(res.body));

    access_token = res.body.access_token;


    return true;

    }).catch(err => {

    return console.log(JSON.stringify(err));

  • Greg Katechis
    Zendesk Developer Advocacy

    To provide an update here for anyone that comes across this in the future:

    The issue that we were running into had to do with the "client_type" having been set to public, when it needed to be set to confidential. Additionally, our docs are a bit ambiguous about the ID that needs to be used to make the API calls, so I'll be working to get those updated as well!


Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Powered by Zendesk