I’m testing n8n with a trial cloud account and trying to set up an OAuth2 API credential. When the n8n credential OAuth Redirect URL is placed in the OAuth2 app, it indicates that “the URL specified is not accessible”. The Grant Type = Authorization Code.
Please help with what redirect URL must be used.
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Hey, what service are you trying to connect to? That error is usually coming from the OAuth provider’s side, not n8n. Just make sure youre copying the exact redirect URL shown in the n8n credential page and pasting it into your OAuth app config. Some providers try to actually reach the URL when you save it which causes that error since the callback endpoint only responds during an active OAuth flow.
Hi. Thanks for the response. Yes, the error is coming on the OAuth provider’s side, even though the exact redirect URL is being pasted into the OAuth app config. The OAuth app does check the redirect URL on saving. As I cannot override the saving check, it seems like n8n Cloud will not be able to connect to the OAuth provider? Fyi, the credential set up does however work on the self-hosted community n8n.
that oauth provider actively checks for the redirect url , but n8n’s callback endpoint which is like your redirect’/callback URL will only respond to when the OAuth flow is LIVE! And this is not a bug neither a feature but a very well known limitation, as ifthe OAuth provider requires the URL to be reachable at registration time and that check cannot be bypassed.
Hi @Anshul_Namdev . Thanks for the clarification. This means that n8n is not a viable solution to be used with the particular OAuth provider’s platform, and that I must discontinue using n8n and find an alternate solution.
@OptimaBSC it is not an N8N problem, it is a n8n CLOUD problem, consider using a SELF HOSTED VPS n8n and everything would work just as expected, because the OAuth callback endpoint on a properly configured self hosted VPS instance responds correctly during the OAuth flow, and the preconfigured webhook_URL makes sure that everything would be static and all the callback and redirect URLs would work just perfect. Consider Hostinger it is easy.