Getting 403 - "{\n \"error\": {\n \"code\": 403,\n \"message\": \"Request had insufficient authentication scopes.\",\n \"status\": \"PERMISSION_DENIED\"\n }\n}\n" when connecting to google photo via http node

Hi community,
I tried to setup http node access to google photo, but for some reason, i keep getting the following error:

{
  "errorMessage": "Forbidden - perhaps check your credentials?",
  "errorDescription": "Request had insufficient authentication scopes.",
  "errorDetails": {
    "rawErrorMessage": [
      "403 - \"{\\n  \\\"error\\\": {\\n    \\\"code\\\": 403,\\n    \\\"message\\\": \\\"Request had insufficient authentication scopes.\\\",\\n    \\\"status\\\": \\\"PERMISSION_DENIED\\\"\\n  }\\n}\\n\""
    ],
    "httpCode": "403"
  },
  "n8nDetails": {
    "nodeName": "HTTP Request",
    "nodeType": "n8n-nodes-base.httpRequest",
    "nodeVersion": 4.2,
    "itemIndex": 0,
    "time": "7/13/2025, 3:49:46 PM",
    "n8nVersion": "1.101.1 (Self Hosted)",
    "binaryDataMode": "filesystem",
    "stackTrace": [
      "NodeApiError: Forbidden - perhaps check your credentials?",
      "    at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_1af219c3f47f2a1223ec4ccec249a974/node_modules/n8n-nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts:780:15)",
      "    at processTicksAndRejections (node:internal/process/task_queues:105:5)",
      "    at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1194:9)",
      "    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1564:27",
      "    at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected][email protected]_/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2135:11"
    ]
  }
}

I pretty much carbon copy the setup per the link:Can't get Google Photos API to work in HTTP Request node with OAuth2 - #2 by MutedJam
but it just didn’t work for me. Here’s my setup:

and my credential setup in the node generic credential type > Oauth2 API:


The scope in the above are: https://www.googleapis.com/auth/photoslibrary https://www.googleapis.com/auth/photoslibrary.sharing https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata

Finally, in my google console, I have the following scopes enabled:

I have also tried reconnect the credential each time I make any changes to the scope on google cloud console but still getting error…

My setup is:

  • Docker compose n8n
  • self starter kit
  • n8n 1.101.1

Any help would be appreciated, thanks!

TheBird

hello @jerry_Cole

you will need this scope for that method
https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata

Method: mediaItems.list | Google Photos APIs | Google for Developers

1 Like

Thank you @barn4k that works!

1 Like

Hi @barn4k I’m desperately trying to connect my n8n to my Google Photos as well… I’ve done everything that n8n forums suggested (correct scopes, URLs, etc.). But I keep getting “forbidden, please check your credentials”…

After your suggestion to add “https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata” to my scope, I stopped getting the “forbidden” message, but now I’m getting empty results (as if I didn’t own any album, but I do own some). Any help?

May not be your problem but could be relevant.
It appeared google has removed the scopes for reading and listing media since apr 2025.

https://www.reddit.com/r/androiddev/comments/1isijab/coping_with_google_photos_api_changes_no_more/

It explained why I could get any media except a field that says pagetoken when I run the list media call.

You are right… It seems that no headless APIs is allowed to access Google Photos anymore (especially photos or album that were NOT created by API)

1 Like