Authentication token expired

SeriousJ 201 Reputation points
2023-05-07T12:25:33.16+00:00

We're using API V13 of the Bing Ads API.

It was working fine and then without us touching our code, we started to get "AuthenticationTokenExpired" errors.

We checked an re-checked many times and our authentication token is created right before making a call, so it can't have expired in a few seconds. What's going on?

Below is the exception we're getting:

 [previous:Exception:private] => 
    [faultstring] => Invalid client data. Check the SOAP fault details for more information. TrackingId: 4621e7a3-5add-456f-800d-45aab387f34e.
    [faultcode] => s:Server
    [faultcodens] => 
    [faultactor] => 
    [detail] => stdClass Object
        (
            [AdApiFaultDetail] => stdClass Object
                (
                    [TrackingId] => 4621e7a3-5add-456f-800d-45aab387f34e
                    [Errors] => stdClass Object
                        (
                            [AdApiError] => stdClass Object
                                (
                                    [Code] => 109
                                    [Detail] => 
                                    [ErrorCode] => AuthenticationTokenExpired
                                    [Message] => Authentication token expired. Please renew it or obtain a new token.
                                )

                        )

                )

        )
Microsoft Advertising API
Microsoft Advertising API
A Microsoft API that provides programmatic access to Microsoft Advertising to manage large campaigns or to integrate your marketing with other in-house systems.
485 questions
{count} votes

Accepted answer
  1. Hel_code 85 Reputation points
    2023-05-09T15:57:55.16+00:00

    We were able to resolve our issue by changing the requested scope to "openid offline_access https://ads.microsoft.com/msads.manage" in the OAuth authorization request that redirects the user to https://login.live.com/oauth20_authorize.srf.

    Then when requesting the access token we added the scope "https://ads.microsoft.com/msads.manage" in the request. It does require the user to create a new OAuth authorization, but seems to have resolved it on our side.

    1 person found this answer helpful.

7 additional answers

Sort by: Most helpful
  1. Hel_code 85 Reputation points
    2023-05-08T16:42:32.9533333+00:00

    Same issue here. Started happening on May 6th and all request are being returned with a "AuthenticationTokenExpired" after successfully retrieving a new token. Recreating the application is not an option for us due to the amount of customers registered on the current application.

    0 comments No comments

  2. Tarun Shimoga 0 Reputation points
    2023-05-08T17:37:27.21+00:00

    Guess don't have much to add at this point apart from mentioning that we've been observing same issue since 05/05.

    0 comments No comments

  3. Bony Simon 0 Reputation points
    2023-05-09T07:39:21.43+00:00

    We are also facing the same issue from may 5th 2023. Tried the refresh token generation too many times still the same error .

    AdApiError = 
          (AdApiError){
             Code = "109"
             Detail = None
             ErrorCode = "AuthenticationTokenExpired"
             Message = "Authentication token expired. Please renew it or obtain a new token."
          }
    
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.