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
sdetweilsdetweil 

Java OAuth failed, invalid_client_id

I am building the java sample..

 

I created my remote access application definition, and copied the key and secret to the environment

as client_id and client_key per the sample.

 

"Copy the consumer key and consumer secret, and set them as environment variables in the project settings in your IDE. For example, in Eclipse Helios, right click the project, and select Properties > Run/Debug Settings > select the project > Edit > Environment. You will also need to add your username and password, plus the Force.com login URL for your org; by default this will be https://login.salesforce.com/ for Developer Edition orgs, https://test.salesforce.com/ for sandboxes. "

 

I get OAuth failed: {"error":"invalid_client_id","error_description":"client identifier invalid"}

 

so, what am I doing wrong? I verified that the correct value is picked up from the environment..

 

sdetweilsdetweil

any ideas here?  I can use Oauth with another org using cUrl (for access to a rest based web service on SFDC), and the data format  appears the same.

 

I also added my security token to my pasword for logon.. no change..

 

thanks for any help

sbob909sbob909

Better late than never ...

 

Everytime I get this error, it always has to do with a key and secret mishap. In one case, I specified the wrong key and secret pair values. In another case, I had misnamed the environment variables that my Ruby/Rails app expected.