Getting {"error": "invalid_grant", "error_description": "failure failure"} in Salesforce?

I am trying to get a session id for a partial Salesforce package.

My code is:

curl https://test.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=definitely the correct client id" -d "client_secret=definitely the correct client secret" -d "username=mymail@mail.com.partialbox" -d "password=passandsecuritytoken"

What else have I done:

  • Grant full access in the settings of the connected application
  • Set ip limits to limit ip limits
  • "All users can authenticate themselves"
  • Double verified pass, client identifier, client secret, username

I am still getting the error {"error":"invalid_grant","error_description":"authentication failure"}.

I searched the SF forums and StackOverflow questions, but I could not find a solution for this. Does anyone know what else could be the problem here?

+4
2

Salesforce TLS 1.1 22 2017 , : help.salesforce.com.

.Net 4.6, :

System.Net.ServicePointManager.SecurityProtocol = 
SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

- :

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\v4.0.30319]
"SchUseStrongCrypto"=dword:00000001

: SecurityProtocol .NET 4.5

+2

, , , , "" , .

-, IP- .

→ → ( )

" IP" " IP".

, , , IP, , , , - .

-, curl, , , .

, , , "invalid_grant".

, , , , , , , .

+1

Source: https://habr.com/ru/post/1619020/


All Articles