This is related to a previous question I asked: See: salesforce saml bearer oauth flow
Anyway i am still having problems understanding how to consistently get an access token from salesforce for a resource and then utilize that access token. Yesterday i managed to get an access token. For a given user i was noticing in the login history that the remote access 2.0 app was successful. Now this morning, having changed nothing, i am getting the following error:
{"error_description":"expired authorization code","error":"invalid_grant"}
This is really strange as i am not using an authorization code (as I am using SAML bearer flow). It looks like there is a setting in salesforce i am missing to consistently get a token for this flow. Also yesterday i noticed one other thing. When i did manage to get a token, the format of the token was different to the token i received from salesforce when using 3 legged oauth flow.
Can anyone shed any light on why i am now getting the expired authorization code message ?
Thanks again for all your help