Conversation APIs

Team, Is there any way I can use /conversations API with out OAUTH2. From the documentation I understand we can use api tokens, but if I use api tokens it is throwing an error.

Hi @Anil_Gara,

Welcome to the community! :tada:

All the :freshchat: Freshchat APIs can be used without using OAuth2 in the platform with the use of API token. I hope, you’re referring to use using OAuth in the Request Method of the developer platform. Please clarify if you’re using the API outside our platform.

Could you attach the error code, error message, and the code snippet of the API usage to let us check and help troubleshooting the issue?

Hi @Raviraj,

Thanks for your reply.

I am planning to integrate freshchat as a live agent for one of our bot by using APIs. Here I cannot use sdk or code snippet provided by freshchat. Please find below error snippet.

Hi @Anil_Gara this typically means that you your account is on a different data center.
Try using the url https://api.in.freshchat.com/v2/agents and the API call should work properly.

Let me know if this still does not work.

1 Like

Hi @Arjun_Paliath, I have a similar problem. I generated API token from settings -> API tokens. I have a trial “Forest” plan in Freshchat. I try https://api.freshchat.com/v2/agents and https://api.in.freshchat.com/v2/agents

Also I try to get a JWT token auth (from /v2/docs/jwt/) and received another error “The parsed JWT indicates it was signed with the HS256 signature algorithm, but the specified signing key of type sun.security.rsa.RSAPublicKeyImpl may not be used to validate HS256 signatures. Because the specified signing key reflects a specific and expected algorithm, and the JWT does not reflect this algorithm, it is likely that the JWT was not expected and therefore should not be trusted. Another possibility is that the parser was configured with the incorrect signing key, but this cannot be assumed for security reasons.”

Thank you!

1 Like

Hi @for2ne ,

I believe this is a data center issue.

If possible try https://api.eu.freshchat.com.
If the issue still persists, let me know your Freshchat account URL, I will have this investigated from our end.

2 Likes