Unable to generate Twitter OAuth 2.0 token in Freshworks app (Platform v3.0) using oauth_config.json file

Hi team,

I’m developing a Twitter (X) → Freshdesk integration app using Platform v3.0. The app uses oauth_config.json to generate a Twitter OAuth 2.0 token.

When I try to authorize via my Freshworks app, I always get an error invalid_request – Redirect is requested though the redirect URI is correctly configured in my Twitter developer app.

Here is my oauth_config.json:

{
  "integrations": 



{
    "twitter": {
      "display_name": "Twitter (X)",
      "client_id": "<client id>",
      "client_secret": "<client secret>",
      "authorize_url": "https://twitter.com/i/oauth2/authorize",
      "token_url": "https://api.twitter.com/2/oauth2/token",
      "options": {
        "scope": "tweet.read users.read offline.access",
        "pkce": true
      },
      "token_type": "account"
    }
  }
}

When Freshworks generates the authorization URL, I get this:

https://x.com/i/oauth2/authorize
  ?scope=tweet.read%20users.read%20offline.access
  &response_type=code
  &redirect_uri=https%3A%2F%2Foauth.freshdev.io%2Fauth%2Fcallback &pkce=true &state=203b1081530553e9fd297115b8401423f43b021bbcc98633dfc8d870ec2051222bfbd8b6edb38312e7462527cb413be17897a2be32515cb8ab4418ead360727e3de9966c99aeeb9a
  &client_id=<client id>

But the response from Twitter is always:

{
  "errors": [
    {
      "error": "invalid_request",
      "error_description": "Redirect is requested.",
      "redirect_uri": "https://oauth.freshdev.io/auth/callback?error=invalid_request&state=203b1081..."
    }
  ]
}

Things I’ve already tried / verified:

  • The redirect URI (https://oauth.freshdev.io/auth/callback) is correctly added in my Twitter developer app.

  • The same client ID, redirect URI, scopes, and PKCE flow work perfectly in Postman and in my own test code.

  • Only when using Freshworks app OAuth flow do I get this invalid_request – Redirect is requested error.

Is there anything special required for OAuth 2.0 with PKCE in Freshworks Platform v3.0 to make Twitter authentication work?

Thanks!

Follow-up: Twitter (X) OAuth 2.0 with Freshworks Platform v3.0

Hi team,

I’m still facing the invalid_request – Redirect is requested error while trying to authorize Twitter OAuth 2.0 using oauth_config.json in my Freshworks app.

  • Redirect URI https://oauth.freshdev.io/auth/callback is correctly added in the Twitter developer app.

  • Same client ID, scopes, and PKCE flow work fine in Postman and my own test code.

  • The error occurs only when using the Freshworks OAuth flow.

Can anyone confirm if there are special requirements or extra configuration needed for Twitter OAuth 2.0 with PKCE on Freshworks Platform v3.0?

Thanks in advance!

Hi,
Freshworks Platform v3.0 does not support PKCE. When “pkce”: true is set in oauth_config.json, the platform does not generate the necessary parameters for a PKCE-based flow.

Can you please check if Twitter supports a non-PKCE based OAuth flow? If PKCE is the only option, we will need to treat proper PKCE support as a feature request for the platform.

Hi Deepak Arumugham,

Thank you for the clarification. I checked Twitter’s OAuth 2.0 documentation, and it appears that PKCE is mandatory for their Authorization Code flow—Twitter does not support a standard non-PKCE OAuth 2.0 flow for client apps.

Since Freshworks v3.0 does not currently support PKCE, this explains why the integration fails.I’ll be looking forward to any future updates from Freshworks regarding PKCE support in the platform.

Thanks again for your guidance!

Hi @Deepak_Arumugham,

Thank you for your earlier clarification regarding PKCE support.

After reviewing the September 2025 “What’s New” update in the documentation (FDK 9.7.0 – Engineering enhancement), I noticed the mention of improved handling of OAuth redirection URLs to prevent mismatches with third-party services. Based on this, I rechecked the Twitter OAuth token generation using the latest FDK version with Platform v3.0+.

However, the issue still persists — the token is not getting generated, and Twitter continues to require the PKCE-based Authorization Code flow, which isn’t yet supported by the Freshworks Platform v3.0.

Could you please confirm if there’s any workaround or configuration update available in the latest version to support PKCE or an alternative OAuth flow for Twitter?

Thanks,
Dhanameenatchi S