[Bug/Issue] Freshchat Conversation Create API returning "Signed JWSs are not supported"

What I’m trying to do

I’m building a Freshworks marketplace app that creates a Freshchat conversation programmatically using theod with a requests.jsontemplate.

My template looks like this:

"createFreshchatConversati
“schema”: {
“method”: “POST”,
“host”: “<%= context.freshchat_domain %>”,
“path”: "/v2/conversat
“headers”: {
“Authorization”: “Basic <%= encode(context.api_key) %>”,
“Content-Type”: "app
}
}
}


Error I’m getting

Signed JWSs are not suppor

The API call fails immediately with this error. No conversation is created.


What I’ve tried

  • Verified the API key is correct (works fine in Postman with Bearer )
  • Confirmed the domain and
  • The same key works when tested directly outside the FDK template

Suspected cause

The FDK’s encode() helper appears to wrap the value in a signed JWS (JSON Web Signature) rather than pere. Freshchat v2 doesn’tsupport signed JWSs and rejects the Authorization header entirely.


Question

What is the correct way to pass a Freshchat API key as a Bearer token inside a requests.json template without triggering this JWS wrapping? Is encode() intended only for Basic auth username:password pairs?

Any help appreciated!

Hi Krishna, your diagnosis is right. encode() is the problem here, and Basic is the wrong scheme for Freshchat.

Root cause
encode() is for Base64-encoding Basic auth (e.g. Freshdesk APIKEY:X). On secure iparams/context values it can produce a platform-wrapped value that Freshchat reads as a signed JWS, hence “Signed JWSs are not supported”.

Freshchat v2 expects Bearer <token>, passed directly - no encode().

Fix your template:

"createFreshchatConversation": {
  "schema": {
    "method": "POST",
    "host": "<%= iparam.freshchat_domain %>",
    "path": "/v2/conversations",
    "headers": {
      "Authorization": "Bearer <%= iparam.freshchat_api_key %>",
      "Content-Type": "application/json"
    }
  }
}

From custom iparams (values via context):

"Authorization": "Bearer <%= context.api_key %>"

Do not use:

"Authorization": "Basic <%= encode(context.api_key) %>"

Also verify:

Item Correct
Auth scheme Bearer, not Basic
encode() Only for Freshdesk-style Basic auth
host FQDN only - youraccount.freshchat.com (no https://)
path Starts with / - e.g. /v2/conversations
Secure key storage iparams.json with "secure": true, or pass via context from custom iparams

Rule of thumb:

  • Freshdesk RESTBasic <%= encode(iparam.api_key) %>
  • Freshchat RESTBearer <%= iparam.api_key %> (no encode)
  • OAuthBearer <%= access_token %>

Related thread: Signed JWSs error with Freshchat API