Skip to content
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

Invalid grant_type and authentication failed #263

Open
arjunnarale opened this issue Aug 18, 2020 · 2 comments
Open

Invalid grant_type and authentication failed #263

arjunnarale opened this issue Aug 18, 2020 · 2 comments

Comments

@arjunnarale
Copy link

arjunnarale commented Aug 18, 2020

            Config::set('forrest.authentication', 'UserPassword');
            Config::set('forrest.credentials.consumerKey', $salesforceDetails->consumer_key);
            Config::set('forrest.credentials.consumerSecret', $salesforceDetails->consumer_secret);
            Config::set('forrest.credentials.callbackURI', $salesforceDetails->callback_url);
            Config::set('forrest.credentials.loginURL', $salesforceDetails->login_url);
            Config::set('forrest.credentials.username', $salesforceDetails->username);
            Config::set('forrest.credentials.password', $salesforceDetails->password);
            Config::set('forrest.credentials.grant_type', 'authorization_code');

I am already set the required parameter and set grant_type as authorization_code, Its throws error invalid grant_type. I have used another way using the Password instead of authorization_code. It throws 400 bad requests.
Please advise as early as possible.

@omniphx
Copy link
Owner

omniphx commented Oct 15, 2020

When you configured your password did you append the security token to the end? If Login IP ranges are configured and you are in an acceptable range, you don't need the security token but you could also be getting this error due to IP ranges. You can check the user's login history and see more details there inside your salesforce org.

@krlmrr
Copy link

krlmrr commented Feb 17, 2022

Try setting the IP setting to 'relaxed'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants