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 "[email protected]" -d "password=userpw"

4
  • 2
    You would need to create a Connected App and use the Client ID and Secret from there.
    – Aayush K
    Commented Aug 28, 2019 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
    Commented Aug 28, 2019 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
    Commented Aug 28, 2019 at 18:20
  • 1
    Great that it worked. I'll move it to the answer so that the question can be closed.
    – Aayush K
    Commented Aug 28, 2019 at 18:21

1 Answer 1

1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .