• Aryn Hurst-Clark
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 3
    Replies
Hello all,

we have a Professional Edition with API access enabled. There is a custom permission set created (no "API enabled" option in the user settings unfortunately) with "API enabled" ticked and that permission set is assigned to the user I am using to connect. The user is a System Administrator. 

There is a connected app created with relaxed IP permission and self-authenticating user set as an option. I am also aware that the password is a concatenation between the user password and a security token.

Yet I keep getting the same error when I try to connect:

curl -v https://test.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=***" -d "client_secret=***" -d "username=aryn@***" -d "password=***"
*   Trying 96.43.149.120...
* Connected to test.salesforce.com (96.43.149.120) port 443 (#0)
* TLS 1.2 connection using TLS_RSA_WITH_AES_256_CBC_SHA256
* Server certificate: test.salesforce.com
* Server certificate: Symantec Class 3 Secure Server CA - G4
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> POST /services/oauth2/token HTTP/1.1
> Host: test.salesforce.com
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Length: 219
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 219 out of 219 bytes
< HTTP/1.1 400 Bad Request
< Date: Tue, 27 Oct 2015 15:13:05 GMT
< Set-Cookie: BrowserId=5av_S5gFRS2DzP6lCKMcXA;Path=/;Domain=.salesforce.com;Expires=Sat, 26-Dec-2015 15:13:05 GMT
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, no-store
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
<
* Connection #0 to host test.salesforce.com left intact
{"error":"invalid_grant","error_description":"authentication failure"}

Thank you. Any help and/or suggestion is much appreciated. 

Best,
Aryn
Hello all, 

sorry if this is already answered somewhere else. I read through similar errors and tried the propoed solutions but nothing worked for me and I am out of ideas.

The error message I get is {"error":"invalid_grant","error_description":"authentication failure"}, the other errors that I found in the forums had more info in the description.

So, I have created a "Connected app", the app has full access, users may self-authorize and the IP restrictions are relaxed (all suggestions I found for similar errors). 

And yes, the password I am passing is the user_password+securty_token.

curl -v https://test.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=***" -d "client_secret=***" -d "username=aryn@***" -d "password=****"


*   Trying 96.43.148.28...
* Connected to test.salesforce.com (96.43.148.28) port 443 (#0)
* TLS 1.2 connection using TLS_RSA_WITH_AES_256_CBC_SHA256
* Server certificate: test.salesforce.com
* Server certificate: Symantec Class 3 Secure Server CA - G4
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> POST /services/oauth2/token HTTP/1.1
> Host: test.salesforce.com
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Length: 217
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 217 out of 217 bytes
< HTTP/1.1 400 Bad Request
< Date: Thu, 15 Oct 2015 13:04:32 GMT
< Set-Cookie: BrowserId=9Pq6RC_ERhea3M-zML1BCw;Path=/;Domain=.salesforce.com;Expires=Mon, 14-Dec-2015 13:04:32 GMT
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, no-store
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
<
* Connection #0 to host test.salesforce.com left intact
{"error":"invalid_grant","error_description":"authentication failure"}


What else could cause this problem? Maybe the edition? Or the user account?
Hello all,

we have a Professional Edition with API access enabled. There is a custom permission set created (no "API enabled" option in the user settings unfortunately) with "API enabled" ticked and that permission set is assigned to the user I am using to connect. The user is a System Administrator. 

There is a connected app created with relaxed IP permission and self-authenticating user set as an option. I am also aware that the password is a concatenation between the user password and a security token.

Yet I keep getting the same error when I try to connect:

curl -v https://test.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=***" -d "client_secret=***" -d "username=aryn@***" -d "password=***"
*   Trying 96.43.149.120...
* Connected to test.salesforce.com (96.43.149.120) port 443 (#0)
* TLS 1.2 connection using TLS_RSA_WITH_AES_256_CBC_SHA256
* Server certificate: test.salesforce.com
* Server certificate: Symantec Class 3 Secure Server CA - G4
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> POST /services/oauth2/token HTTP/1.1
> Host: test.salesforce.com
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Length: 219
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 219 out of 219 bytes
< HTTP/1.1 400 Bad Request
< Date: Tue, 27 Oct 2015 15:13:05 GMT
< Set-Cookie: BrowserId=5av_S5gFRS2DzP6lCKMcXA;Path=/;Domain=.salesforce.com;Expires=Sat, 26-Dec-2015 15:13:05 GMT
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, no-store
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
<
* Connection #0 to host test.salesforce.com left intact
{"error":"invalid_grant","error_description":"authentication failure"}

Thank you. Any help and/or suggestion is much appreciated. 

Best,
Aryn
Hello all, 

sorry if this is already answered somewhere else. I read through similar errors and tried the propoed solutions but nothing worked for me and I am out of ideas.

The error message I get is {"error":"invalid_grant","error_description":"authentication failure"}, the other errors that I found in the forums had more info in the description.

So, I have created a "Connected app", the app has full access, users may self-authorize and the IP restrictions are relaxed (all suggestions I found for similar errors). 

And yes, the password I am passing is the user_password+securty_token.

curl -v https://test.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=***" -d "client_secret=***" -d "username=aryn@***" -d "password=****"


*   Trying 96.43.148.28...
* Connected to test.salesforce.com (96.43.148.28) port 443 (#0)
* TLS 1.2 connection using TLS_RSA_WITH_AES_256_CBC_SHA256
* Server certificate: test.salesforce.com
* Server certificate: Symantec Class 3 Secure Server CA - G4
* Server certificate: VeriSign Class 3 Public Primary Certification Authority - G5
> POST /services/oauth2/token HTTP/1.1
> Host: test.salesforce.com
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Length: 217
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 217 out of 217 bytes
< HTTP/1.1 400 Bad Request
< Date: Thu, 15 Oct 2015 13:04:32 GMT
< Set-Cookie: BrowserId=9Pq6RC_ERhea3M-zML1BCw;Path=/;Domain=.salesforce.com;Expires=Mon, 14-Dec-2015 13:04:32 GMT
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Pragma: no-cache
< Cache-Control: no-cache, no-store
< Content-Type: application/json;charset=UTF-8
< Transfer-Encoding: chunked
<
* Connection #0 to host test.salesforce.com left intact
{"error":"invalid_grant","error_description":"authentication failure"}


What else could cause this problem? Maybe the edition? Or the user account?