MicrosoftDocs / Advertising-docs

Creative Commons Attribution 4.0 International
15 stars 59 forks source link

Deprecated #556

Closed scauglog closed 5 years ago

scauglog commented 5 years ago

the code doesn't compile and when we change the type to match the API it fail with error code 109 token expired


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

eric-urban commented 5 years ago

@scauglog thanks for catching the compile issue. I've fixed it in my local branch, and will refresh the documentation next opportunity.

The 109 error indicates that your access token has expired. You can refresh it using a the previous refresh token.

((OAuthDesktopMobileAuthCodeGrant)(authorizationData.getAuthentication())).requestAccessAndRefreshTokens(refreshToken);

Best regards, Eric

scauglog commented 5 years ago

Hi, great reactivity. I have found that the refresh token problem is due to a mismatch of environment. The code create a OAuthDesktopMobileAuthCodeGrantin Production (line 34) but it create ServiceClient for sandbox (line 88).

eric-urban commented 5 years ago

@scauglog great feedback, and we'll also update the sample to centralize the environment setting.