• Matt Schofield
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

When trying to refresh my user token via the API i receve the below error, i am trying to test out an integration  work arround for when the integration password is reset / security token expires.

{
    "error": "invalid_grant",
    "error_description": "expired access/refresh token"
}


I have tried to make the request via Curl and using Postman but receve the same error, as far as i can tell i have all of the appropiate rights set up on my connected app.

connected app
Example Curl request:

curl POST https://eu16.salesforce.com/services/oauth2/token -d "grant_type=refresh_token&client_id=3MVG9f..............................svQ10&client_secret=97E8475611A9...............................096391&refresh_token=lZI..........ZSQ"

I have redacted the sensitive infomation above, but this is the data i am entering:

client_id = This is the Consumer Key taken from the connected app screen

client_secret = This is the Consumer Secret  taken from the connected app screen

refresh_token = This is the user security token (Obtained from settings -> My Personal Infomation -> Reset Security Token) 

Is anyone able to detail what i am doing incorrectly?