I'm trying to use the REST API with OAuth2 in PHP. The problem is that I followed this tutorial : http://developer.force.com/cookbook/recipe/interact-with-the-forcecom-rest-api-from-php And when I try to run my this code I have this error :
Client error: `POST https://login.salesforce.com/services/oauth2/token` resulted in a `400 Bad Request`
response: {"error":"invalid_grant","error_description":"expired authorization code"}
I suppose that I need to configure something on my Salesforces Connected App but after around 3h of googling I can't find where is my problem.
Do you have an idea?
thanks