You need to sign in to do that
Don't have an account?

OAuth 2.0 Password flow, "unknown_error"
When requesting an access token from https://login.salesforce.com/services/oauth2/token, I get the response:
unknown error, please retry your request
I seem to be making a well-formatted request with proper credentials, but I get this mysterious error. Has anybody seen this and can anybody help?
Many thanks,
MagneticDisk
I am facing the very same issue.
@MagneticDisk : were you able to figureout what the issue is about?
I have not figured this out. Here is my HTTP Request, does it match yours? Do I need to pass something else in the header? User-agent? Accepts?
POST /services/oauth2/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Host: login.salesforce.com
Content-Length: 235
Expect: 100-continue
Connection: Keep-Alive
grant_type=password&client_id=[foo]&client_secret=[bar]&username=[baz]&password=[woof]
Are you using the security token along with the password?
I get
{"error":"unknown_error","error_description":"retry your request"}
message. This happens only for the developer account. I tried the same authentication method on a professional (trial) and a group edition with success.
Below is the command i use. I made sure i am using the correct client_id/client_secret/password+securityToken
curl https://login.salesforce.com//services/oauth2/token -d "grant_type=password&client_id={client_id}&client_secret={secret}&username={uname@email.com}&password={password+SecurityToken}"
Yes, I'm using password + security token. I am wondering, like you, if it isn't something specific to the dev env that's the problem.
I had same problem with my salesforce account yesterday. I then created a new test org and it worked this morning and when I came back this afternoon I was back to this message with no changes to my code.
HTTP/1.1 400 Bad Request
Server:
Content-Type: application/json; charset=UTF-8
Transfer-Encoding: chunked
Date: Mon, 05 Nov 2012 21:50:52 GMT
0042
{"error":"unknown_error","error_description":"retry your request"}
Any help would be much much appreciated.
I had the same issue on developer account. Solved it eventually when I submitted the request to https://ap1.salesforce.com instead of https://login.salesforce.com
ap1.salesforce.com is the domain I see when I login to my account from the browser.
Changing from login.salesforce.com to <instanceURL>.salesforce.com solved it for me as well!
Does anyone know why this is??? I was beating my head against the wall for over an hour trying to figure this out.
http://stackoverflow.com/questions/38482611/vb-net-salesforce-post-request-returns-400-bad-request-error
Add this to your code:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11;
This was my issue. I'm developing a integration solution using BizTalk, and neither the sample article in Salesforce.com nor the one in MSDN (microsoft site) have this line of code. I wasted time thinking about issues witht the header values like Expect or Connection, even UrlEncode issues with the paramteres in the payload. But nooooo... freaking TLS setting.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11