Skip to content
Diego Giacomelli edited this page Nov 30, 2013 · 8 revisions

Q. How to fix the "expired access/refresh token" error when I call client.Authenticate(authFlow)?

A. If you are passing all need information to IAuthenticationFlow's implementation, maybe you are point to wrong end-point, see below:

  • Sandbox end-point: https://test.salesforce.com/services/oauth2/token
    • This end-point is available only for accounts that have purchased a sandbox. If you are using a Developer Edition Account you don't have access to this end-point, because the developer edition account can't be upgraded to production and should use the production end-point.
  • Production end-point: https://login.salesforce.com/services/oauth2/token
    • This end-point is used for production or in case of Developer Edition Account has the same meaning of Sandbox end-point.

See more in http://wiki.developerforce.com/page/An_Introduction_to_Environments.


Q. Where I can get my client id and client secret?

A. Log in your Salesforce account and go to Setup > Build > Create > Apps.

Edit or create your app in "Connected Apps" section.


Q. Whre I can get my Security Token?

A. Log in your Salesforce account and go to [your name] > My settings > Personal > Reset My Security Token.

Remenber: if your IP is not in the whitelist, you'll need to append you API security token to the password when use UsernamePasswordAuthenticationWorkflow.

Clone this wiki locally