BingAds client status, oauth_web_auth_code_grant

I would like to get my custom Report data from my BingAds using the Bingad API. I am using an example KeywordsAds.pythat may be wrong. However, my problem starts with authentication, I can not find the necessary input for authentication. I miss examples in similar, so I know if I am adding the correct data:

authorization_data=AuthorizationData(
    account_id='123456789', --instead of just None
    customer_id='123456789', --instead of just None
    developer_token='12345A1234567891', --instead of just DeveloperTokenGoesHere
    authentication='OAuthWebAuthCodeGrant', --instead of just None

)

1) In the code above, what authenticationshould I choose for WebAPI? (2) And for my problem it is indicated whether to use WebAPI, or would the platform be useful Web?

CLIENT_ID='ClientIdGoesHere'
CLIENT_STATE='ClientStateGoesHere'

3) What is Client_State? I made this term, but did not find an explanation. What values ​​can be inserted?

, , client_secret redirection_uri , Python on Bing:

oauth_web_auth_code_grant = OAuthWebAuthCodeGrant(
    client_id=CLIENT_ID,
    client_secret=CLIENT_SECRET,
    redirection_uri=REDIRECTION_URI

?

+4
1

, .

, , account_id customer_id. developer_token , . authentication 'OAuthWebAuthCodeGrant'.

1: WebAPI , (2) CLIENT_ID WebAPI Application ID URI, api://.

Q3: CLIENT_STATE , .

, , .

, , , Python. CSV, Pandas, , CSV , , Google Analytics

+2

Source: https://habr.com/ru/post/1679693/


All Articles