Skip to main content
Hello,

 

We are currently using the following command to generate a token, however the server keeps returning:

 

Command:

 

curl -v https://{instance}.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id={appKey}" -d "client_secret= {appSecret}" -d "username={loginUserName}" -d "password={Key}{Token}" -H "X-PrettyPrint: 1"

 

Error:

 

{

 

  "error" : "invalid_grant",

 

  "error_description" : "authentication failure"

 

* Connection #0 to host login.salesforce.com left intact

 

}

 

Things we've tried (including reading documentation and Q&A both here and on StackExchange):

 

1) Using login.salesforce.com raather than the instance (naXX)

 

2) Using test.salesforce.com rather than the instance (naXX)

 

3) Not using a password token (with different endpoints from #1,#2)

 

4) Setting IP Restrictions to relaxed

 

5) Setting users to authenticate themselves

 

6) Setting network access to the IP being used to send the command (both start and end IP.)

 

7) Trying alternate grant_type (s) to see what happened (alternate errors for those respective auth flows.)

 

8) Sending the parameters as one query string

 

Ideas? There must be something simple!

 

Thanks!

 

 
1 Antwort
  1. 30. Juli 2018, 17:36
    Hi David,

     

    I wasn't able to find related posts here, but may I also suggest posting your query over to the developer forums for advice:

     

    https://developer.salesforce.com/forums

     

    Thanks!
0/9000