Unauthorized error while trying to call Live Chat API

I am trying to call Live Chat API from Salesforce to get tickets logged. I keep on getting Unauthorized error. I am passing username and password while making the call and the request details are as below:

[Endpoint=https://api.livechatinc.com/v2/tickets?date_from=2018-09-19, Method=GET, External Credential Type=EXTERNAL, HTTP Header Authorization=Method: Basic - Authorization Credential Hash: -613868949, Retry on 401=True]

In Response I get Status Code=401 unauthorized

Hello @vrattan,

Please follow the next steps:

  1. Please visit our official Developers Console -> Tools -> Personal Access Token section (https://developers.livechat.com/console/tools/personal-access-tokens);
  2. Create new token with following scopes: tickets_read, agents_read;
  3. Now, copy Entity ID (his email address basically) and use it as a login and copy Token and use it as a password. Please also remember that token will dissapear after refreshing the PAT section, so you should store it in a safe place

Let me know if that helps! :slight_smile:

Hi, I am getting a similar error. Has this been resolved? Thank you, Jason

hello @jason.ordaz,

Have you tried the solution above?

Hi, thanks for your reply. I ended up uninstalling the WordPress plugin and just added the LiveChat code to the body. I will let you know if that works as soon as WordPress sends its automated error check email to me. Thanks, Jason

1 Like