POST /oauth2/v3/token HTTP/1.1 Host: www.googleapis.com Content-Type: application/x-www-form-urlencoded code=4/P7q7W91a-oMsCeLvIaQm6bTrgtp7& client_id=8819981768.apps.googleusercontent.com& client_secret={client_secret}& redirect_uri=https://oauth2-login-demo.appspot.com/code& grant_type=authorization_code
Добрый день,
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=YOUR_CLINET_ID&redirect_uri=urn:ietf:wg:oauth:2.0:oob&response_type=code&scope=https://www.googleapis.com/auth/adwords
curl -s -d code=AUTHORIZATION_CODE -d grant_type=authorization_code -d \
client_id=YOUR_CLIENT_ID -d client_secret=YOUR_CLIENT_SECRET \
-d redirect_uri=urn:ietf:wg:oauth:2.0:oob \curl -s -d refresh_token=YOUR_REFRESH_TOKEN -d grant_type=refresh_token \
-d client_id=YOUR_CLIENT_ID -d client_secret=YOUR_CLIENT_SECRET \
<soapenv:Header>
<ns1:RequestHeader soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201402">
<ns1:clientCustomerId>xxx-xxx-xxxx</ns1:clientCustomerId>
<ns1:developerToken>ВАШ_ТОКЕН_РАЗРАБОТЧИКА</ns1:developerToken>
<ns1:userAgent>НАЗВАНИЕ_ВАШЕГО_ПРИЛОЖЕНИЯ</ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:partialFailure>false</ns1:partialFailure>
</ns1:RequestHeader>
</soapenv:Header>
POST /oauth2/v3/token HTTP/1.1 Host: www.googleapis.com
Content-Type: application/x-www-form-urlencoded client_id=8819981768.apps.googleusercontent.com& client_secret={client_secret}& refresh_token=1/6BMfW9j53gdGImsiyUH5kU5RsR4zwI9lUVX-tqf8JXQ& grant_type=refresh_token
POST /api/adwords/o/v201409/TrafficEstimatorService HTTP/1.1
Host: adwords.google.com
Authorization: Bearer Указываю_полученный_выше_access_token
Content-Type: text/xml;charset=UTF-8
Content-Length: …
<?xml version="1.0"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope">
…
</soap:Envelope>