JWT strings must contain exactly 2 period characters

Hi Team,

I am using freshchat API token for one of the integration. But when I try to make an API call with that token it throws me and 400 error with this message “JWT strings must contain exactly 2 period characters. Found: 1”.

Kindly help me out on this to get resolved.

Thanks & Regards,
Gopi

@Gopi,
Good Day!
Have you passed the correct API?
and Can you please share with us the code snippet which you are using?
and the HAR logs too :slight_smile:

Thanks

Also, how are you making this API call? Are you using Request Method? Or trying via Postman or in any other way?

I am using the get method in both the postman and request methods.

URL: https://api.eu.freshchat.com/v2/channels

The response I am getting 400 Bad Request error.
{
“success”: false,
“error_code”: 0,
“error_message”: “JWT strings must contain exactly 2 period characters. Found: 1”
}

  1. Is this problem occurring to a specific customer account?
  2. is Freshchat tied to both Freshdesk and Freshsales? Which product is the customer/user using?
  1. Is this problem occurring to a specific customer account?
    Yes, this problem is occurring in a specific customer account only.
  2. is Freshchat tied to both Freshdesk and Freshsales? Which product is the customer/user using?
    The customer using Freshchat from the Freshsales Suite.
1 Like

Given this is account specific problem, it’s better we get in touch with Freshsales Support to have this problem resolved for us. I put you in touch with the right team to take forward this discussion.

Let us know what you learn!

1 Like

Freshsales Support team:

In summary, the user account from which the developer is trying to consume is in the US region, so the support requested to use https://api.freshchat.com/v2/channels instead of https://api.eu.freshchat.com/v2/channels.

The issues seem to be resolved hereby.

2 Likes