HTTP Request for Charles Schwab

Describe the problem/error/question: Tryign to setup HTTP request and create new credential fro Charles Schwab developer API but not able to do it.

What is the error message (if any)?

{
“error”: “invalid_client”,
“error_description”: “Unauthorized”
}

Please share your workflow

{
“nodes”: [
{
“parameters”: {
“url”: “https://auth.tdameritrade.com/auth”,
“authentication”: “genericCredentialType”,
“genericAuthType”: “oAuth2Api”,
“sendHeaders”: true,
“headerParameters”: {
“parameters”: [
{}
]
},
“sendBody”: true,
“bodyParameters”: {
“parameters”: [
{}
]
},
“options”: {}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
1280,
240
],
“id”: “51ca2807-7897-4a6a-9cd7-4b418f2e2952”,
“name”: “HTTP Request”,
“credentials”: {
“httpHeaderAuth”: {
“id”: “1TYFgXbkmwcZQ9IH”,
“name”: “Header Auth account”
},
“oAuth2Api”: {
“id”: “iyTFyVKaIj7VwRaN”,
“name”: “CharlesSchwab”
}
}
}
],
“connections”: {},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “bca21dd0a71d761cceef09c0b02bdff7aa1a5feec76148b3d550b7c230ef2497”
}
}

(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.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:. 1.82.3
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud
  • Operating system: Mac

The “invalid_client” error with “Unauthorized” indicates that:

  • The OAuth client credentials are invalid.
  • The client_id and/or client_secret may not be set correctly.
  • The authorization URL may not correspond to the correct API for Charles Schwab.

Verify the OAuth client details:

  • Check that the client_id, client_secret, redirect_uri, and scopes are correct and fully configured on the authentication node.

Confirm the correct URL for Charles Schwab:

  • If you are trying to use the Charles Schwab API directly, make sure you are not using the old TD Ameritrade endpoint.
  • Search for official Schwab Developer Platform documentation.

Reconfigure the OAuth2 node in n8n:

  • Use the OAuth2 API credential type from n8n and configure it correctly:
Auth URL
Access Token URL
Client ID
Client Secret
Scope
  • Redirect URL (must match the one registered in the developer console)

Test authentication outside of n8n (optional, but useful):

  • Use Postman or curl to verify that your OAuth2 configuration is working outside of n8n. If it fails there too, the problem is with the client’s credentials or configuration.

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