I think my access token for my scratch org expired. I'm using sfdx in visual studio code. What's the easiest way to get/fresh my access token?


The easiest way to refresh the access token is just to open the scratch org via Salesforce DX.

From the command palette, you can do > SFDX: Open Default Org. Or, from the integrated terminal, do

sfdx force:org:open

optionally with -u my_scratch_alias to select a specific org.

Once you do so, any other functionality you might use that depends on getting an access token via SFDX should work again, provide the scratch org is not expired.

  • This is what i am trying to do when i get the error – Ben Arnao Mar 25 '19 at 15:20
  • 1
    Are you certain that the scratch org is not expired? Could you show in your question the output of sfdx force:org:list? – David Reed Mar 25 '19 at 15:22
  • I guess it did expire.. thanks – Ben Arnao Mar 25 '19 at 15:25
  • What about CI / CLI tools? – Edmondo1984 Apr 10 '19 at 8:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.