Option to connect to sandbox instance (Salesforce) [GOT CREATED]

Continuing the discussion from Problem loading parameters for salesforce:

Just check, sadly that is currently not possible. It should not be difficult to add. Just made this post a feature request.

1 Like

Added. We will let you know when this is released.

4 Likes

Got released with n8n@0.130.0

If I try to connect to the sandbox right now, I get invalid grant error:

{
  "code": 0,
  "message": "The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.",
  "stack": "Error: The provided authorization grant (e.g., authorization code, resource owner credentials) or refresh token is invalid, expired, revoked, does not match the redirection URI used in the authorization request, or was issued to another client.\n    at getAuthError (/usr/local/share/.config/yarn/global/node_modules/client-oauth2/src/client-oauth2.js:122:15)\n    at /usr/local/share/.config/yarn/global/node_modules/client-oauth2/src/client-oauth2.js:276:21\n    at processTicksAndRejections (internal/process/task_queues.js:95:5)\n    at async /usr/local/share/.config/yarn/global/node_modules/n8n/dist/src/Server.js:990:36"
}

Welcome to the community @MichaelN

What version of n8n are you running?

@RicardoE105 The newest 0.130

Create new credentials with the same data as the credentials that are not working and try again. I had to do that to make it work. There seems to be a bug that I’m trying to track down.

1 Like

Perfect, worked. Weird, I wouldn’t have come to that idea I guess :smiley:

1 Like

@RicardoE105 I have created a new instance in N8N. Still, I’m unable to change the URL…

Can you please elaborate?

Did this PR actually fix the issue? I still am directed to login.salesforce.com to authenticate via OAuth2 when ā€˜Sandbox’ is selected as environment type.

I still see the issue. No one in SF does dev on production, so adding this option can do wonders :slight_smile:

Currently facing this issue also — the Salesforce Sandbox OAuth in n8n Cloud still redirects to login.salesforce.com instead of test.salesforce.com. An update on whether this has been resolved, or a recommended workaround for Cloud users, would be appreciated.