function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ReverendReverend 

OAuth2 Invalid Client ID

Yesterday my OAuth2 configuration against my sandbox was working just fine.
Today it stopped working and I am receiving:
  • error = invalid_client_id
  • error_description = client identifier invalid

I was running the OAuth2 request via curl (http://en.wikipedia.org/wiki/CURL) without any issues for days and suddenly it is just not working.

curl https://test.salesforce.com/services/oauth2/authorize?response_type=code&client_id=MYCLIENTID&client_secret=MYCLIENTSECRET&scope=full&redirect_uri=https%3A%2F%2Flocalhost%3A8443%2Fsalesforce%2Foauth2%2Fcallback&display=page&prompt=page

I tried switching to my specific pod inthe URL (https://csXX.salesforce.com) and did not have any luck.
Best Answer chosen by Reverend
ReverendReverend
GOT IT!

Needed to add an additional parameter to the request that isn't on that page
https://developers.google.com/accounts/docs/OAuth2WebServer (https://developers.google.com/accounts/docs/OAuth2WebServer" target="_blank)


In the authorize request you need to pass in access_type.
I passed in offline and everything worked like a charm.

All Answers

ReverendReverend
The instructions I verified are from here:
https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_oauth_web_server_flow.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=remoteaccess_oauth_web_server_flow.htm&language=en_US)

I walked through everything again and am still not having luck.  This process was definitely working on 7/21 when the original implementation was set up.

Anyone else?
Should I be looking at a different process?
ReverendReverend
GOT IT!

Needed to add an additional parameter to the request that isn't on that page
https://developers.google.com/accounts/docs/OAuth2WebServer (https://developers.google.com/accounts/docs/OAuth2WebServer" target="_blank)


In the authorize request you need to pass in access_type.
I passed in offline and everything worked like a charm.
This was selected as the best answer