6

I am using BingAds-PHP-SDK to get authenticated user detail.

Firstly done Authentication with OAuth successfully and get authentication token and refresh token.
But when call GetUser() returning following Exception.

Main Exception detail:

stdClass Object (
    [AdApiFaultDetail] => stdClass Object (
        [TrackingId] => bdfe1a94-b33f-xxxx-a542-1adc15148bae
        [Errors] => stdClass Object (
            [AdApiError] => stdClass Object (
                [Code] => 105
                [Detail] => 
                [ErrorCode] => InvalidCredentials
                [Message] => Authentication failed. Either supplied credentials are invalid or the account is inactive
           )
       )
   )
)

Exception faultcode : s:Server
Exception faultstring : Invalid client data. Check the SOAP fault details for more information

More detailed example here

kupendra
  • 1,002
  • 1
  • 15
  • 37

3 Answers3

2

Does the Microsoft account user (corresponding to your access token) have permissions to login to the Bing Ads web UI? It is possible to get an access token for a Microsoft account who does not have Bing Ads permissions (and thus GetUser would fail with the 105 error by design), so please check to make sure this user can manage at least one Bing Ads account.

If the Microsoft account user has Bing Ads UI access, then I suggest contacting support for help with troubleshooting the 105 error. In that case it will also help if you provide support the SOAP request, response, and timestamp.

I hope this helps!

Eric Urban
  • 582
  • 2
  • 7
2

I was getting a similar error.

I used:

print $proxy->GetService()->__getLastRequest()."\n";
print $proxy->GetService()->__getLastResponse()."\n";

to display the SOAP errors.

I then saw the error was: The user does not represent a authorized developer

Which led me to check my AccountId and CustomerId were correct.

Toby Beresford
  • 1,028
  • 9
  • 18
1

There are multiple possible issues that could cause your SOAP API request to the Bing API to fail with that 105 Invalid Credentials, some of those issues could be unrelated to the OAuth info you are passing into the call (from my experience).

A few things to check:

  1. You have a valid Client App setup with universal access
  2. You properly requested your Access Token and Refresh Token using the App ID created in step 1 and you utilized the proper scopes in the request
  3. The user you used to authenticate the scopes in your OAuth Token Request is the same user used to generate your Developer Token
  4. Ensure your SOAP URLs are correct and that you are properly authenticating and making your API calls to the right URL. You can test this with Fiddler (over SSL) to ensure your SOAP Envelope and Header look properly formed and are being sent to the correct endpoint URL.
stitz
  • 1,429
  • 1
  • 16
  • 33