Zoho Phonebridge OAuth2 Token Does Not Refresh

Describe the issue

I’m having an issue with Oauth2 token refresh with Zoho Phonebridge API. After 1 hour from the original access_token being issued, I get an error when trying to run any workflows.

I have added a parameter of access_type=offline and set the grant type as Authorization Code

According to the Zoho Phonebridge docs, here is how the auth header should be constructed for requests:

To use this access token, you need to construct a normal HTTP request and include it in an Authorization header along with the value of “Bearer”.

What is the error message (if any)?

Error: Request failed with status code 400

Please share the workflow

Here is the Oauth2 credentials:

Here is the workflow:

I’ve tried setting this up both with Generic Oauth2 api creds entered, as well as using the Predefined Zoho Oauth2 creds.

Information on your n8n setup

  • n8n version: 0.204.0
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: npm

On a separate note, is there a way to get the access / refresh token from an Oauth2 api credential?

Hi @jhambach, from reading your message I am not sure what would cause the refresh to fail here. From taking a look at n8n/NodeExecuteFunctions.ts at b71295e4de658fb134b67eaa0b630704f858ce7e · n8n-io/n8n · GitHub, any error in an authenticated request should trigger the refresh. Last time I checked n8n wasn’t logging any details around the OAuth2 refresh though, so these issues are rather tricky for me to understand.

Perhaps @RicardoE105 knows what might be the problem here?

As for reading your access and refresh tokens, this would work through the CLI for example:


1 Like

Thanks for that info Tom! What’s odd is that the scope returned from this is different than the scopes provided:

Not that I think that should cause an issue with the token refreshing. Just noticed that behavior.

I think I may have a temporary workaround by manually refreshing the token from what you gave me @MutedJam. By using the refresh_token provided from the workflow you gave me, I can refresh the token with Refreshing Access Token | Online Help - Phonebridge API

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.