MicrosoftDocs / Advertising-docs

Creative Commons Attribution 4.0 International
15 stars 59 forks source link

Bing ads api authorization problem #555

Closed dmitryfishoil closed 5 years ago

dmitryfishoil commented 5 years ago

Hi guys, I've done all steps as it's described in this article - https://docs.microsoft.com/en-us/bingads/guides/walkthrough-desktop-application-php?view=bingads-12 As a result, refresh token was written to refresh.txt file but I got error -

Fault Code: s:Server Fault String: Invalid client data. Check the SOAP fault details for more information Fault Detail: object(stdClass)#28 (1) { ["AdApiFaultDetail"]=> object(stdClass)#29 (2) { ["TrackingId"]=> string(36) "fd3e2a21-c7df-40b6-8d1a-670279b436bd" ["Errors"]=> object(stdClass)#30 (1) { ["AdApiError"]=> object(stdClass)#31 (4) { ["Code"]=> string(3) "105" ["Detail"]=> NULL ["ErrorCode"]=> string(18) "InvalidCredentials" ["Message"]=> string(89) "Authentication failed. Either supplied credentials are invalid or the account is inactive" } } } } -----

InvalidCredentialsAuthentication failed. Either supplied credentials are invalid or the account is inactive

What seems to be the problem? How can I fix this?

Best regards, Dmitry

eric-urban commented 5 years ago

@dmitryfishoil please note, that sample defaults to sandbox environment with dev token BBD37VB98. Are you also using sandbox credentials + app ID? Otherwise if you are using production credentials, please ensure you are using production app ID + production dev token + update the ApiEnvironment in AuthHelper.php.

I hope this helps!

dmitryfishoil commented 5 years ago

Hi Eric! Yes, my developer token was wrong. It was problem. Thanks for your help

eric-urban commented 5 years ago

@dmitryfishoil thanks for confirming!