HELP 401 Unauthorized all routes /rest/*

I am self-hosting n8n via Docker and need to retrieve, through the API, the authorization link for Google Calendar so my users can connect their accounts. The endpoint I’m calling is:

GET https://{my-n8n-url}/rest/oauth2-credential/auth?credentialsId={my-id}

HTTP/1.1 401 Unauthorized
Server: nginx/1.26.0 (Ubuntu)
Date: Wed, 25 Jun 2025 19:23:09 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 43
Connection: keep-alive
ETag: W/“2b-Rih9aWYMb4GwzEPSZO5wMUAD4eU”
Vary: Accept-Encoding

{“status”:“error”,“message”:“Unauthorized”}

Expected Behavior:
The endpoint should return a 307 Temporary Redirect with a Location header pointing to the Google OAuth2 consent screen.

Hey @dudssecco,

Are these users part of your business or customers as that changes things.

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