+ Start a Discussion
gs88834gs88834 

OAuth 2.0 invalid_grant error with grant_type = password

Hi, I'm running into an issue with getting an access token using a connected app with grant_type = password.  Here is my curl script:

curl https://test.salesforce.com/services/oauth2/token -H "Content-Type:application/x-www-form-urlencoded" -d "grant_type=password" -d "client_id=<my client_id>" -d "client_secret=<my client_secret>" -d "username=<myusername@domain.com>" -d "<my password+secret>"

I'm getting an invalid_grant error  "Authentication failure" 
 
Best Answer chosen by gs88834
SandhyaSandhya (Salesforce Developers) 
Hi,

Going to connected apps in Salesforce and changing 'permitted users' from 'Admin approved users are pre-authorized' to 'All users may self-authorize' 

Please refer below link step 9 which worked for others it may help you.

http://stackoverflow.com/questions/12794302/salesforce-authentication-failing

Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution. 
 
Thanks and Regards
Sandhya

 

All Answers

SandhyaSandhya (Salesforce Developers) 
Hi,

Going to connected apps in Salesforce and changing 'permitted users' from 'Admin approved users are pre-authorized' to 'All users may self-authorize' 

Please refer below link step 9 which worked for others it may help you.

http://stackoverflow.com/questions/12794302/salesforce-authentication-failing

Hope this helps you!

Please mark it as Best Answer if my reply was helpful. It will make it available for other as the proper solution. 
 
Thanks and Regards
Sandhya

 
This was selected as the best answer
gs88834gs88834
Thanks you very much.  This solved my problem!
Love JeetLove Jeet
Awesome read...!!
Love Shayari (https://shayaritumse.in/love-hindi-shayari)
Love Jeet 6Love Jeet 6
One of the best blog I have ever read...Thanks!!

Valentines Day Quotes (https://sayingsmagazine.com/valentines-day-quotes)
love jeet 7love jeet 7
All these solutions are really great..!!

Romantic Good Morning Wishes (https://wishesmagazine.com/romantic-good-morning-wishes-for-gf-bf/)
 
kaushal sharma 24kaushal sharma 24
the
word to pdf (http://fastkpdf.com/" style="color:blue; text-decoration:underline)
age calculator (https://www.realagecalculator.com/" style="color:blue; text-decoration:underline)
insta fonts (http://fontsbrother.com/" style="color:blue; text-decoration:underline)
news (https://news.rklearnway.com/" style="color:blue; text-decoration:underline)
theme download (https://rktechworld.com/" style="color:blue; text-decoration:underline)
blogging (http://rklearnway.com/" style="color:blue; text-decoration:underline)
sarkari result (http://sarkariline.com/" style="color:blue; text-decoration:underline)
Sarkarifoam (http://sarkarifoam.com/" style="color:blue; text-decoration:underline)
Hindi network (https://hindinetworks.com/" style="color:blue; text-decoration:underline)
Hindi gk (https://hindi-gk.info/" style="color:blue; text-decoration:underline)

word to pdf (http://fastkpdf.com/" style="color:blue; text-decoration:underline)
age calculator (https://www.realagecalculator.com/" style="color:blue; text-decoration:underline)
insta fonts (http://fontsbrother.com/" style="color:blue; text-decoration:underline)
news (https://news.rklearnway.com/" style="color:blue; text-decoration:underline)
theme download (https://rktechworld.com/" style="color:blue; text-decoration:underline)
blogging (http://rklearnway.com/" style="color:blue; text-decoration:underline)
sarkari result (http://sarkariline.com/" style="color:blue; text-decoration:underline)
Sarkarifoam (http://sarkarifoam.com/" style="color:blue; text-decoration:underline)
Hindi network (https://hindinetworks.com/" style="color:blue; text-decoration:underline)
Hindi gk (https://hindi-gk.info/" style="color:blue; text-decoration:underline)

word to pdf (http://fastkpdf.com/" style="color:blue; text-decoration:underline)
age calculator (https://www.realagecalculator.com/" style="color:blue; text-decoration:underline)
insta fonts (http://fontsbrother.com/" style="color:blue; text-decoration:underline)
news (https://news.rklearnway.com/" style="color:blue; text-decoration:underline)
theme download (https://rktechworld.com/" style="color:blue; text-decoration:underline)
blogging (http://rklearnway.com/" style="color:blue; text-decoration:underline)
sarkari result (http://sarkariline.com/" style="color:blue; text-decoration:underline)
Sarkarifoam (http://sarkarifoam.com/" style="color:blue; text-decoration:underline)
Hindi network (https://hindinetworks.com/" style="color:blue; text-decoration:underline)
Hindi gk (https://hindi-gk.info/" style="color:blue; text-decoration:underline)

word to pdf (http://fastkpdf.com/" style="color:blue; text-decoration:underline)
age calculator (https://www.realagecalculator.com/" style="color:blue; text-decoration:underline)
insta fonts (http://fontsbrother.com/" style="color:blue; text-decoration:underline)
news (https://news.rklearnway.com/" style="color:blue; text-decoration:underline)
theme download (https://rktechworld.com/" style="color:blue; text-decoration:underline)
blogging (http://rklearnway.com/" style="color:blue; text-decoration:underline)
sarkari result (http://sarkariline.com/" style="color:blue; text-decoration:underline)
Sarkarifoam (http://sarkarifoam.com/" style="color:blue; text-decoration:underline)
Hindi network (https://hindinetworks.com/" style="color:blue; text-decoration:underline)
Hindi gk (https://hindi-gk.info/" style="color:blue; text-decoration:underline)

word to pdfword to pdfword to pdfword to pdfword to pdf (http://fastkpdf.com/" style="color:blue; text-decoration:underline)
aostv appaostv app
Everything is very open and very clear explanation for step by step keep moving, waiting for more updates, thank you for sharing with us. and follow below link for more info on https://developer.salesforce.com/forums?id=906F0000000BMODIA4&feedtype=SINGLE_QUESTION_DETAIL&dc=Formulas_Validation_Rules_Discussion&criteria=BESTANSWERS
https://aostv.xyz/ (http://aostv.xyz)
Johnson JoyJohnson Joy
Sugar balance (https://www.liverphil.org/sugar-balance-review/) is a dietary supplement to regulates sugar metabolism and balancing the blood sugar level and maintain insulin production.
Java BurnJava Burn
If you are looking to start on your weight loss journey, then you've come to the right place. The tips below will help jump start you onto a road of shedding pounds and dropping inches. The weight loss process does not happen overnight. You need to start incorporating these ideas into your life and you will start to lose pounds.

Check Out : https://www.clevescene.com/cleveland/java-burn-reviews-is-it-safe-kickstart-your-metabolism-with-a-morning-coffee/Content?oid=37404425
Java BurnJava Burn
The simplest advice for those seeking to lose weight is this: first, set your goals and then determine how realistic they are for you. Many people, especially women, cling to an outdated body image rather than looking to achieve a weight that is best for their current health. Consequently, they set unrealistic goals and are often disappointed when those goals are not met. You should therefore think carefully about what weight is healthy for you now, at this point in your life, and work from there.

https://www.westword.com/storyhub/java-burn-reviews-javaburn-does-it-work-ingredients-side-effects-crucial-report
Java BurnJava Burn
You can consume less calories, and lose more weight, if you take the time to cut up your food. Portion control is difficult for most people, so take a food that contains a large amount of calories (like chocolate) and cut it into smaller portions. You can still eat what you like, but by only consuming a small amount of the food, you will not gain as much weight.
https://www.laweekly.com/java-burn-reviews-warning-weight-loss-coffee-any-side-effects-read/
Java BurnJava Burn
Losing weight is easier if you get cardiovascular exercise. For example, you can boost your heart rate by jogging, cycling or walking every day. When your heartrate is up, you are burning fat. A good goal is to get a half hour of aerobic exercise three or four times per week.
https://www.riverfronttimes.com/stlouis/java-burn-reviews-does-javaburn-morning-coffee-drink-restore-energy-and-metabolism/Content?oid=36339877
Java Burn ReviewsJava Burn Reviews
Every year, millions of people start diet and exercise programs in an effort to lose weight and shed excess pounds. Losing weight is not easy, if it was, no one would be overweight. When attempting to lose fat, it is important to follow an intelligently designed program. This article contains a number of great weight loss tips.

https://www.nuvectramedical.com/java-burn-reviews/
Exipure ReviewsExipure Reviews
A great way to help you lose weight is to stop eating regular cottage cheese and start eating non-fat or low-fat cottage cheese. Regular cottage cheese has a pretty high fat content. Low-fat cottage cheese is much healthier and actually promotes lean body mass when eaten at night.

https://www.clevescene.com/cleveland/exipure-reviews-kickstart-your-metabolism-with-this-supplement/Content?oid=37576786
Exipure ReviewsExipure Reviews
Did you know that dining with others would help you consume less food than those who dine alone? The social interaction with other people while eating a meal is actually a good tactic for those who want to lose weight. Planning meals with family and friends a few times a week will improve your plan to lose weight and maintain your fitness program.

https://www.laweekly.com/exipure-reviews-does-it-work-ingredients-side-effects-crucial-report/