BingAds / BingAds-Python-SDK

Other
116 stars 162 forks source link

Connecting raises OAuthTokenRequestException with error_code: invalid_client #158

Closed gadse closed 4 years ago

gadse commented 4 years ago

Hi there,

I noticed that it's currently impossible to use the example code in order to access the API using a pre-existing client_secret. Trying to do so raises the following exception on line 477 of bingads/authorization.py:

bingads.exceptions.OAuthTokenRequestException: error_code: invalid_client, error_description: AADSTS70002: The provided request must include a 'client_secret' input parameter.
Trace ID: f99b338e-0624-46a1-b81a-a681ed84f700
Correlation ID: 4a4e47c4-c83f-4fe1-8d66-acf01a29c550
Timestamp: 2020-07-16 12:47:51Z

I already have a fix in preparation, but I wanted to create an appropriate ticket before. :)

qitia commented 4 years ago

@eric-urban for awareness.

eric-urban commented 4 years ago

@gadse thanks for the suggestion although we'll leave it up to developers to modify the sample as needed. The current implementation can leverage the test client ID without client secret.