Hello n8n Community,
I am seeking assistance with a complex and persistent authentication issue when trying to set up LinkedIn posting on my n8n Cloud instance.
My primary goal is to publish content to my personal LinkedIn account using the w_member_social scope. I have meticulously configured my LinkedIn application, but I cannot establish a working connection that permits posting.
- Environment and Configuration
n8n Instance: n8n Cloud.
Goal: Personal Account Posting (requires w_member_social).
LinkedIn App Configuration:
Products Added: Share on LinkedIn and Sign In with LinkedIn are active.
Authorized Redirect URLs:
Both the n8n Cloud personal URL (https://[acc].app.n8n.cloud/rest/oauth2-credential/callback)
and the generic n8n URL (https://oauth.n8n.cloud/oauth2/callback) are registered.
- Method 1: Standard LinkedIn OAuth2 API Credential (Following Docs)
I first attempted to use the official n8n Credential type for LinkedIn, expecting the platform to handle the complex OAuth2 flow automatically.
Credential Type: LinkedIn OAuth2 API.
Scopes Used: Initially, r_liteprofile r_emailaddress w_member_social, then reduced to r_liteprofile w_member_social to avoid the r_emailaddress error.
Result: The connection fails during the token exchange phase due to scope or secret errors, OR the connection appears successful, but when attempting to use the credential in a ‘Publish Post’ node, I immediately receive:
Error: Forbidden - perhaps check your credentials? (403 Error).
- Method 2: Manual Token Exchange via HTTP Request Node
Recognizing that the standard credential was failing, I attempted to manually manage the OAuth2 flow to isolate the token permissions.
Step A: Code Acquisition: I successfully forced a browser authorization (by excluding non-working scopes) and received an authorization code for w_member_social.
Step B: Token Exchange: I set up an HTTP Request node to exchange the code for an Access Token, but this failed because the LinkedIn API requires the Client Secret to be sent in the request body, a functionality that seems unsupported by the n8n Generic OAuth2 template for Authorization Code flow.
Step C: Manual Testing: I manually obtained a token and tested it via an HTTP Request to the /v2/ugcPosts endpoint, but this also resulted in a 403 Forbidden error, indicating that the token itself lacks the necessary write permissions, even though I explicitly authorized them.
- Core Questions for the Community
My analysis points to two potential root causes, which I hope the community can clarify:
Client Secret Transfer: How can I correctly configure the Generic OAuth2 API Credential in n8n Cloud to ensure the client_id and client_secret are correctly sent in the request body during the token exchange step for the Authorization Code flow? (This seems to be the fundamental blocker).
Scope Activation Delay: Is there a known delay or specific process required by LinkedIn to activate the r_liteprofile and w_member_social scopes, even after successfully adding the corresponding products (Sign In with LinkedIn and Share on LinkedIn)?
Any guidance on how to bypass this 403/Client Secret issue would be highly appreciated.
Share the output returned by the last node
{
“errorMessage”: “Forbidden - perhaps check your credentials?”,
“errorDescription”: “403 - {"status":403}”,
“errorDetails”: {
“rawErrorMessage”: [
“403 - {"status":403}”
],
“httpCode”: “403”
},
“n8nDetails”: {
“nodeName”: “Publish Post”,
“nodeType”: “n8n-nodes-base.linkedIn”,
“nodeVersion”: 1,
“resource”: “post”,
“operation”: “create”,
“time”: “12/12/2025, 00:53:30”,
“n8nVersion”: “1.122.5 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeApiError: Forbidden - perhaps check your credentials?”,
" at ExecuteContext.linkedInApiRequest (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_8da18263ca0574b0db58d4fefd8173ce/node_modules/n8n-nodes-base/nodes/LinkedIn/GenericFunctions.ts:71:9)“,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_8da18263ca0574b0db58d4fefd8173ce/node_modules/n8n-nodes-base/nodes/LinkedIn/LinkedIn.node.ts:278:22)“,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1074:8)”,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1255:11)“,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1691:27”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2307:11"
]
}
}
Information on your n8n setup
- n8n version: 1.122.5
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
- Operating system: MacOS
