Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Salesforce by (11.9k points)

I was working in my sandbox environment trying to figure out the Chatter API calls - I had saved my refresh token during my testing but it was lost sometime later.

Now when I try to hit the API I am receiving the following error:

"expired access/refresh token"

How do I get around this now? I do not have a refresh token so I cannot make a request to refresh my token, and I'm not sure how to expire/delete/ revoke it via the UI so that I can proceed with my testing.

my cUrl call is as follows:

curl

    --form client_id=3MVG92.u...2KycWe

    --form client_secret=668...930

    --form grant_type=password

    --form username=mike....com

    --form password=*#()@*#$@

    --proxy 127.0.0.1:3128 --insecure

  https://test.salesforce.com/services/oauth2/token 

Things I have tried:

  • Reset my password
  • Delete remote access and create a new one with new client_id / secret
  • Reset my security token

Does anyone know how to expire the token or get a new refresh token via the API or UI in Salesforce?

1 Answer

0 votes
by (32.1k points)

In order to reverse access from the UI, click on the following in the menu at the top right of Salesforce: 

Your Name | Setup | My Personal Information | Personal Information and clicking Deny

More info here: https://na12.salesforce.com/help/doc/en/remoteaccess_about.htm

What scope are you using? If you specify a scope (like 'api'), you'll need to explicitly request a refresh token by also specifying 'refresh token' in your scope (space delimited). More info on scopes here:https://na12.salesforce.com/help/doc/en/remoteaccess_oauth_scopes.htm

You'll need to use 'https://code.google.com/oauthplayground/' as your callback URL in your app configuration.

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...