1

https://code.exacttarget.com/app-development/marketing-cloud-apps/single-sign-on.html describes the request->user->internalOauthToken as:

An OAuth2 token that can access Email SOAP API. It is also referred to as the legacyToken in the Fuel API Family (REST). For more information please review the OAuth And SOAP API page.

Does this token ever expire? Does it require refreshing? If so, how?

2 Answers 2

1

It expires after one hour, so yes you will need token refreshing.

5
  • Is that documented anywhere? I found documentation that says 1 hour for the non-legacy token user.oauthToken (on the page linked above, in the attribute description), but are both affected? Do you have to refresh the token within the 1 hour, or anytime? Does the refreshed token itself expire after 1 hour? May 7, 2015 at 18:57
  • Look a few lines down in the documentation: "Length in seconds before tokens expire. Value of 3600 is equal to 1 hour for example."
    – Timothy
    May 7, 2015 at 19:05
  • Thanks! I guess the plural "tokens" implies what I need. ;) If I refresh for an offline token, does that new one last forever? May 7, 2015 at 19:12
  • This example code never refreshes the internal token, implying that maybe it does not require it after all? github.com/ExactTarget/SubscriberSearch-rub/blob/master/helpers/… May 8, 2015 at 13:30
  • I've never actually used the internal token, so I cannot comment.
    – Timothy
    May 8, 2015 at 19:01
0

Desired path is to use the oAuth access token and not the legacy token.

I wrote a post on how to do this - http://www.kellyjandrews.com/2014/02/20/using-fuel-oauth-with-the-soap-api.html

Basically replace your header with the following:

<Header>
    <fueloauth xmlns="http://exacttarget.com">YOURACCESSTOKEN</fueloauth>
</Header>

Grab the access token as normal, and use here. Legacy Tokens still work, but they will probably go away in the future, and this will save you headaches later.

1
  • Note that as of this writing, Ruby FuelSDK (at least) uses the legacy token for many operations. May 13, 2015 at 13:36

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.