0

I'm submitting a curl command to get an oauth token and it fails with a bad client_id. What am I missing

I setup an Auth. Provider and used MTest as mu consumer key and MRestTest as my Consumer Secret.

I execute the following curl and get an error for a bad client id. Am I using the wrong thing for my client_id??

curl -v https://test.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=MTest" -d "client_secret=MRestTest" -d "username=user@ourorg.com" -d "password=userpw"

  • 2
    You would need to create a Connected App and use the Client ID and Secret from there. – Aayush K Aug 28 at 16:55
  • So this needs two parts? An auth provider setup and a connected app? The connected apps I see do not have a client_id or client_secret only auth providers have these fields. I also do not see a way to create a connected app – Ohmicron Aug 28 at 17:55
  • That was the magic Aayush. Didn't scroll down far enough to see that part I needed. Thanks. If you want to make that an answer I will acknowledge it and give you credit – Ohmicron Aug 28 at 18:20
  • 1
    Great that it worked. I'll move it to the answer so that the question can be closed. – Aayush K Aug 28 at 18:21
1

You would need to create a Connected App and use the Client ID and Secret from there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.