-
-
Notifications
You must be signed in to change notification settings - Fork 359
-
-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
why client_id and client_secret are mandatory for user and password auth? #283
Comments
Do you have a sample code? |
I'm afraid I don't know why this is - your best bet would be trying to compare the requests Restforce and simple-salesforce make, or maybe reading into the Salesforce API docs and their authentication schemes. I might get a chance to look at some point, but I can't imagine this will be that hard to find out with a bit of research. |
@antwonlee sorry, sample code for the mandatory |
The reason is that salesforce requires these parameters for oauth. And that is what restforce uses to authenticate |
@r9b9rt that documentation seems to conflict with https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_username_password_oauth_flow.htm, which states:
This would imply that the client_secret is not always required, depending on the settings for the connected app. However, after some initial testing I could not get a successful auth without the client_secret after deselecting that option in the connected app settings, so it appears that either this documentation is incorrect or I'm doing something wrong. |
I apologize for raising this old issue, but with API users configured properly, |
Here is a request response showing such an authentication request:
|
also raising this old issue, is there still not a way to use username+password without |
Hi!
I'm having a lot of trouble authenticating to Salesforce using username and password (I'm receiving the infamous
Restforce::AuthenticationError: invalid_client_id: client identifier invalid
error)We have another app connected to Salesforce, using the same credentials which is working without problems (it's using the simple-salesforce python library).
I was wondering why
client_id
andclient_secret
are optional insimple-salesforce
while mandatory inrestforce
even when using user and password auth.I'm not sure if this might be related to my
client identifier invalid
error, but I'm out of clues hereps: I've tried to set the instance hostname as
host: eu6.salesforce.com
without luck.thanks
The text was updated successfully, but these errors were encountered: