+ Start a Discussion
Chad SaarChad Saar 

REST API - Why is it requesting a token for the token request page?

I am trying to get my first token from https://login.salesforce.com/services/oauth2/token.

I make the below request and the server responds " error_description: "authentication failure - Failed: API security token required"" error: "invalid_grant"

The server I am asking to provide a token is requesting a token from me?!? Also why is "Password" and invalid grant type? It is in the documentation here: 
https://www.salesforce.com/us/developer/docs/api_rest/

POST Contents

grant_type=password&client_id=XXXXX&client_secret=XXXXXXX&username=XXXXXXXXX&password=XXXXXXXX&redirect_uri=XXXXXXXXXXX
Michael VerhovskiMichael Verhovski
You must append the security token to password A security token is an automatically-generated key from Salesforce. For example, if a user's password is mypassword, and their security token is XXXXXXXXXX, then the value provided for this parmeter must be mypasswordXXXXXXXXXX. For more information on security tokens see “Resetting Your Security Token” (https://help.salesforce.com/HTViewHelpDoc?id=user_security_token.htm)