Do I need a dev token to access AdWords API via OAuth?

落花浮王杯 提交于 2019-12-11 10:45:57

问题


I am trying to get an access to AdWords API via OAuth. I registered an app, created MCC account (to a different e-mail) and a test account.

I read through AdWords API documentation and don't see that I need a dev token to access an account by oauth. Just clientId, clientSecret and accessToken. But when I try to connect to the API using google-api-adwords-dotnet library. I get "Parameter name: AdWords API requires a developer token"

What is the purpose of OAuth if I cant access the API without MCC and dev token?

Best regards, Andrei

P.S. I can access my test account providing my dev token. But I need to access any client who granted an access to me, not just clients who are part of my MCC account.


回答1:


This question was answered on AdWords API group: https://groups.google.com/forum/#!topic/adwords-api/mC7mB-YYH-Q

A developer token is required to make AdWords API calls. It's main purpose is to ensure that the developer has accepted AdWords API T&Cs, identify your requests in case we need to troubleshoot issues you are facing, etc. In the past, it was also used to identify the account to which API calls were charged, but that's no longer the case since AdWords API calls are now free.

OAuth2 tokens are used to authenticate the calls you make against a client account. You may also use ClientLogin as an alternative to OAuth2, but it is deprecated and it's use is strongly discouraged.

You need an MCC account to get a developer token, but it's not a requirement that the account you make calls to lives under that MCC. Using OAuth, you could make calls to a totally unrelated account (e.g. a client logs in from the UI), as long as you can generate an access token for the same. Right now, your developer token is under review, that's why your ability to make calls are restricted to test accounts. Once your token is approved, you should be able to make calls to any account that you have access to.



来源:https://stackoverflow.com/questions/19151851/do-i-need-a-dev-token-to-access-adwords-api-via-oauth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!