1

When creating a Marketing Cloud Application (to be listed on the HubExchange) an installation of the App issues a JWT token that is received by the defined login end-point. The token contains, amongst other things, an oauthtoken and a refreshToken variables.

I understand that once the oauthotken expires, then the "server" issuing the requests needs to call the refreshToken API call to request a new oauth token, via the refreshToken. The call then returns both a new oauthtoken (to be used, until it will also expire) and a new refreshToken (to be used when the "new" oauth token expires).

Assuming the above is correct, my questions are as follows:

1) Does the refreshToken have any expiry of itself? Assuming we are developing an offline application that performs an operation via the API once a week, would we be able to use the refreshToken to request an oauth token within one week (or 1 day) after the JWT token had been received? (or after a refreshToken had been called?)

2) Does the ability to "refreshToken" (given the user's refreshToken) depend on the user still being logged in to the system?

3) The requirement to "replace" the refreshToken for every call to the refreshToken API call makes it such that the process of "retaining" the connection (or retaining the authorization to access the users' account via the API) much more error prone. For example, if the application that uses the refreshToken has a bug and is not able to properly store the refreshToken (after it had been replaced), then it will not be able re-acquire access to the user's data without asking the client to re-install(?) or re-login(?) to the application such that this will in turn issue a new JWT token with a new set of oauthtoken and refreshTokens... Am I missing something here? is this intentional? is there a work-around? (obviously this issue could be problematic in other cases, not just when there's a bug in the application invoking the API calls).

Thanks, VC.

1 Answer 1

1
  1. By default, the refresh token never expires. I would highly recommend to include your connected app into your application package. This way, your customers would be able to control the refresh token timeout through setup | connected apps.

  2. refreshToken doesn't depend on the user being logged in to the system.

  3. If your application presents an invalid refresh token to Salesforce, then your customer will be taken through the login flow after which a new OAUTH and refresh tokens will be given to your application.

1
  • Thanks Vikas. Can you please confirm that your answers are relevant for the "ExactTarget Market Cloud" Application type (to be listed on HubExchange) (rather than a Salesforce Connected App listed on AppExchange)? Specifically for the 3rd question as I couldn't find any information about the oAuth flow for the ExactTarget Apps...
    – Vitto C
    Commented Sep 23, 2014 at 14:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .