При получении токена авторизации, ошибка: Required parameter is missing: grant_type

2014-12-25 Thread sneustroev
Доброго времени суток!
Может кто-то борол такую проблему?

Пытаюсь получить токен авторизации без клиентских библиотек, следую 
описанию https://developers.google.com/accounts/docs/OAuth2WebServer?hl=ru 
, поулчил код авторизации, но вот при получении токена авторизации получаю 
ошибку, описание ниже:

*Посылаю запрос:*

POST /oauth2/v3/token HTTP/1.1
Host: ссылка http://_http//www.googleapis.com
Content-length: 297
Content-type: application/x-www-form-urlencoded'
Authorization: Bearer

grant_type=authorization_code
code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
client_id=
260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
client_secret=uteV8rw9T2E5O4p2JyMslRc5
redirect_uri=https://developers.google.com/oauthplayground

получаю ошибку:
{ 
error_description: Missing required parameter: code, 
error: invalid_request 
}

*А если запрос:*
POST /oauth2/v3/token HTTP/1.1
Host: ссылка http://_http//www.googleapis.com
Content-length: 297
Content-type: application/x-www-form-urlencoded'
Authorization: Bearer

code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
client_id=
260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
client_secret=uteV8rw9T2E5O4p2JyMslRc5
redirect_uri=https://developers.google.com/oauthplayground;
grant_type=authorization_code

Тогда ошибка:
{
error_description: Required parameter is missing: grant_type,
error: invalid_request
} 

Как можно ее решить? Уже все перепробовал...

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c69ee3d2-d038-4322-8f64-c0ab1633c896%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Получение токена авторизации AdWords без клиентской библиотеки

2014-12-25 Thread Danial Klimkin
В первую очередь, надо удалить данный OAuth клиент и создать новый. 
ClientSecret не должен быть никому известен, а это публичный форум.

1. Создайте новый клиент с типом installed application.

2. Получение verification code. Для этого в браузере откройте ссылку:

https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=
YOUR_CLINET_ID
redirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=
https://www.googleapis.com/auth/adwords


(нужно заполнить client ID)

3. Получение refresh token. Можно с помощью curl:

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 \
https://accounts.google.com/o/oauth2/token

(нужно заполнить все поля)

4. Обновление access token:

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 \

https://accounts.google.com/o/oauth2/token


-Даниил.

On Thursday, December 25, 2014 10:29:39 AM UTC+3, sneus...@treto.ru wrote:

 Посылаю запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer

 grant_type=authorization_code

 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground

 получаю ошибку:
 { 
 error_description: Missing required parameter: code, 
 error: invalid_request 
 }

 А если запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer


 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground;
 grant_type=authorization_code

 Тогда ошибка:
 {
 error_description: Required parameter is missing: grant_type,
 error: invalid_request
 } 

 Как можно ее решить? Уже все перепробовал...

 среда, 24 декабря 2014 г., 12:28:59 UTC+2 пользователь Danial Klimkin 
 написал:

 Добрый день,


 Без библиотек, процесс описан здесь:

   https://developers.google.com/accounts/docs/OAuth2WebServer


 -Даниил, команда AdWords API.


 On Tuesday, December 23, 2014 5:51:57 PM UTC+3, sneus...@treto.ru wrote:

 Доброго времени суток!
 Может кто-то сталкивался, как можно получить токен авторизации без 
 использования клиентской библиотеки, как тут 
 https://developers.google.com/adwords/api/docs/guides/authentication?hl=ru 
 . Т.е. есть ли отличный от описаного по ссылке метод получения этого токена 
 авторизации?

 П,С, при посылке HTTP-запроса получаю ошибку вида 
 AuthenticationError.OAUTH_TOKEN_INVALID

 Буду признателен за ответы!



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6f25e7ef-b524-4456-9f29-3de814f25813%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


ReportDownloadError.INVALID_PARAMETER, Trigger: Missing client information, FieldPath:

2014-12-25 Thread Владимир Шангеев
*1. Настройки:*
  AdWordsApi
add key=UserAgent value=AdWordsApi/
add key=DeveloperToken value=Х/
add key=ХХХ-ХХХ-/
add key='AuthorizationMethod' value='OAuth2' /
add key='OAuth2ClientId' 
value='ХХ-ХХХ-.apps.googleusercontent.com' /
add key='OAuth2ClientSecret' value='Х' /
add key='OAuth2RefreshToken' value='Х' 
/
  /AdWordsApi

*2. Выполняется:*

 private void Start_Click(object sender, EventArgs e)
 {
 AdWordsUser user = new AdWordsUser();
 msg.Text = msg.Text + user.Config.OAuth2RefreshToken.ToString() + 
 Environment.NewLine;
 //Запрос отчета
 try
 {
 string query = @SELECT AccountDescriptiveName, CampaignName, Clicks FROM 
 CAMPAIGN_PERFORMANCE_REPORT WHERE Date = '2014.12.24';
 ReportUtilities utilities = new ReportUtilities(user, v201409, query,
 DownloadFormat.GZIPPED_CSV.ToString());
 using (ReportResponse response = utilities.GetResponse())
 {
 response.Save(D:\\testReport.csv);
 }
 int a = 0;
 }
 catch (Exception ex)
 {
 msg.Text = msg.Text + ex.ToString() + Environment.NewLine;
 }
 }



* 3. ReportUtilities utilities = new ReportUtilities(user, v201409, 
query, DownloadFormat.GZIPPED_CSV.ToString());  Возвращает ошибку:*

 Error: ReportDownloadError.INVALID_PARAMETER, Trigger: Missing client 
 information, FieldPath: 
  --- System.Net.WebException: Удаленный сервер возвратил ошибку: (400) 
 Недопустимый запрос.
в System.Net.HttpWebRequest.GetResponse()
в 
 Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReport(String 
 downloadUrl, String postBody)
--- Конец трассировки внутреннего стека исключений ---
в 
 Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReport(String 
 downloadUrl, String postBody)
в Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.GetReport()
в Google.Api.Ads.Common.Util.Reports.AdsReportUtilities.GetResponse()
в AdWordsApi.AdWordsApi.Start_Click(Object sender, EventArgs e) в 
 D:\Work\PR\AdWordsApi\AdWordsApi\AdWordsApi.cs:строка 37


В чем ошибка? Где-то должно быть прописано поле FieldPath?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/eb0783fb-a6ce-4200-9597-6cf2acccbbfa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Executing an Ad Hoc Report POST in a browser (wrapping it in simple html?)

2014-12-25 Thread gingerfenway


Thanks to anyone for taking the time!

I am new to development so I searched and experimented before coming here 
to ask.

I need to create a single (html?) file, containing only the code required 
to execute an HTTP Post request for an ad hoc report, when the file is 
loaded (opened) in a browser (or maybe something like a Bookmarklet). The 
user will open the file in the browser, and they see the resulting csv. 
(this is a constriction of the environment, there is no work around) 

This is my POST. It works with HTTP Client Test Utilities (such as Postman 
or PAW).
POST /api/adwords/reportdownload/v201409?__rdquery=SELECT%20CampaignId%2C%
20ClickType%2C%20Impressions%20FROM%20CAMPAIGN_PERFORMANCE_REPORT%20DURING%
20THIS_MONTH__fmt=CSV HTTP/1.1
Authorization: Bearer xxx
developerToken: xxx
clientCustomerId: xxx
Content-Type: application/octet-stream
Host: adwords.google.com
Connection: close 


I want to load this in a browser and return the csv. My research tells me 
it might work wrapped in plain html, might need to be part of a simple, 
inline javascript, or might require a 'form'.

I have tried dozens of gists, stackoverflow examples, etc, but I can't seem 
to find anyone doing exactly what I'm trying to do.

I don't know if its more complicated then I think, or less, but does 
someone have a detailed example with a post formated like the one I have 
above? 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/bf368038-d74b-4a5c-953f-ad352399e79f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Parsing WSDL error

2014-12-25 Thread Дмитрий Сидоров
Hello

A few days ago, I discovered that no longer climb reports on advertising of 
our customers in Google Adwords. Reports are generated and climb through 
googleads-php-lib, the latest version.

I saw that there is an error:
Parsing WSDL: Couldn't load from 
'https://adwords.google.com/api/adwords/cm/v201409/ReportDefinitionService?wsdl'

So I ran in console
wget -O - 
https://adwords.google.com/api/adwords/cm/v201409/CampaignService?wsdl;

The request falls off on timeout. 
At the same time several other places it is executed. 
So I concluded that the requests from our north are blocked 
How could I know why it is blocked and how to unblock it?

My client_id: 
533139136934-76r08maqldimcltnusksagi63gbs6msj.apps.googleusercontent.com
Blocked IP-address: 92.53.107.11

Thank you in advance

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/21e5c9c4-6231-472b-897b-fb321ab1507c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Получение токена авторизации AdWords без клиентской библиотеки

2014-12-25 Thread tretomss
Спасибо!
Пытаюсь отправить запрос вида:

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

Получаю ошибку 404:
{
 error: invalid_request,
 error_description: Required parameter is missing: grant_type
}
 Ошибка доступа к ресурсу. Путь не найден:  '/oauth2/v3/token'


среда, 24 декабря 2014 г., 12:28:59 UTC+2 пользователь Danial Klimkin 
написал:

 Добрый день,


 Без библиотек, процесс описан здесь:

   https://developers.google.com/accounts/docs/OAuth2WebServer


 -Даниил, команда AdWords API.


 On Tuesday, December 23, 2014 5:51:57 PM UTC+3, sneus...@treto.ru wrote:

 Доброго времени суток!
 Может кто-то сталкивался, как можно получить токен авторизации без 
 использования клиентской библиотеки, как тут 
 https://developers.google.com/adwords/api/docs/guides/authentication?hl=ru 
 . Т.е. есть ли отличный от описаного по ссылке метод получения этого токена 
 авторизации?

 П,С, при посылке HTTP-запроса получаю ошибку вида 
 AuthenticationError.OAUTH_TOKEN_INVALID

 Буду признателен за ответы!



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2d118389-06b2-4a3c-a9bf-0c8b6e3a86e5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


AdWords API Access from my MCC Account

2014-12-25 Thread sriya
Hello,

I am unable to apply for AdWords API Access through my MCC account. There 
is no AdWords API Center menu item available for me to click on to apply 
for access. Can you please assist me with applying for API access?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/57d08093-9ecd-430b-a019-0a7677f7ad8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: При получении токена авторизации, ошибка: Required parameter is missing: grant_type

2014-12-25 Thread Danial Klimkin
Разобрано здесь:

  https://groups.google.com/forum/#!topic/adwords-api/CcKA0sJtxPE


-Даниил.


On Thursday, December 25, 2014 11:54:17 AM UTC+3, sneus...@treto.ru wrote:

 Доброго времени суток!
 Может кто-то борол такую проблему?

 Пытаюсь получить токен авторизации без клиентских библиотек, следую 
 описанию https://developers.google.com/accounts/docs/OAuth2WebServer?hl=ru 
 , поулчил код авторизации, но вот при получении токена авторизации получаю 
 ошибку, описание ниже:

 *Посылаю запрос:*

 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer

 grant_type=authorization_code

 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground

 получаю ошибку:
 { 
 error_description: Missing required parameter: code, 
 error: invalid_request 
 }

 *А если запрос:*
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer


 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground;
 grant_type=authorization_code

 Тогда ошибка:
 {
 error_description: Required parameter is missing: grant_type,
 error: invalid_request
 } 

 Как можно ее решить? Уже все перепробовал...


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a28f4524-4d31-4aef-b44d-fd6b3ae5b794%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Parsing WSDL error

2014-12-25 Thread Danial Klimkin
Hello Dmitry,


If you IP range were blocked, you would get an error message, rather than a 
timeout.

I suggest checking your network configuration first. Do you have to use a 
proxy? Any chance a transparent proxy is used?

What does traceroute to adwords.google.com say from that location?


-Danial, AdWords API Team.



On Thursday, December 25, 2014 4:14:23 AM UTC+3, Дмитрий Сидоров wrote:

 Hello

 A few days ago, I discovered that no longer climb reports on advertising 
 of our customers in Google Adwords. Reports are generated and climb through 
 googleads-php-lib, the latest version.

 I saw that there is an error:
 Parsing WSDL: Couldn't load from '
 https://adwords.google.com/api/adwords/cm/v201409/ReportDefinitionService?wsdl
 '

 So I ran in console
 wget -O - 
 https://adwords.google.com/api/adwords/cm/v201409/CampaignService?wsdl;

 The request falls off on timeout. 
 At the same time several other places it is executed. 
 So I concluded that the requests from our north are blocked 
 How could I know why it is blocked and how to unblock it?

 My client_id: 
 533139136934-76r08maqldimcltnusksagi63gbs6msj.apps.googleusercontent.com
 Blocked IP-address: 92.53.107.11

 Thank you in advance


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/3da18556-8a07-4476-aed9-43af2560e688%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Получение токена авторизации AdWords без клиентской библиотеки

2014-12-25 Thread sneustroev
Получил ответ когда послал запрос с текстом:
grant_type=authorization_codeclient_secret=uteV8rw9T2E5O4p2JyMslRc5redirect_uri=urn:ietf:wg:oauth:2.0:oobclient_id=260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.comcode=4/XM7FiGwgWf6SLDrEo2ivsp6H-AGM9rC8id42WuJCgjY.Ql0TPHPBSnwUYFZr95uygvVbQ_8BlQI
Ответ вида:
{ 
access_token: ХХ, 
token_type: Bearer, 
expires_in: 3600, 
refresh_token: ХХХ, 
id_token: ХХХ 
}


четверг, 25 декабря 2014 г., 12:24:11 UTC+2 пользователь Danial Klimkin 
написал:

 В первую очередь, надо удалить данный OAuth клиент и создать новый. 
 ClientSecret не должен быть никому известен, а это публичный форум.

 1. Создайте новый клиент с типом installed application.

 2. Получение verification code. Для этого в браузере откройте ссылку:

 https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=
 YOUR_CLINET_ID
 redirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=
 https://www.googleapis.com/auth/adwords


 (нужно заполнить client ID)

 3. Получение refresh token. Можно с помощью curl:

 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 \
 https://accounts.google.com/o/oauth2/token

 (нужно заполнить все поля)

 4. Обновление access token:

 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 \

 https://accounts.google.com/o/oauth2/token


 -Даниил.

 On Thursday, December 25, 2014 10:29:39 AM UTC+3, sneus...@treto.ru wrote:

 Посылаю запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer

 grant_type=authorization_code

 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground

 получаю ошибку:
 { 
 error_description: Missing required parameter: code, 
 error: invalid_request 
 }

 А если запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer


 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground;
 grant_type=authorization_code

 Тогда ошибка:
 {
 error_description: Required parameter is missing: grant_type,
 error: invalid_request
 } 

 Как можно ее решить? Уже все перепробовал...

 среда, 24 декабря 2014 г., 12:28:59 UTC+2 пользователь Danial Klimkin 
 написал:

 Добрый день,


 Без библиотек, процесс описан здесь:

   https://developers.google.com/accounts/docs/OAuth2WebServer


 -Даниил, команда AdWords API.


 On Tuesday, December 23, 2014 5:51:57 PM UTC+3, sneus...@treto.ru wrote:

 Доброго времени суток!
 Может кто-то сталкивался, как можно получить токен авторизации без 
 использования клиентской библиотеки, как тут 
 https://developers.google.com/adwords/api/docs/guides/authentication?hl=ru 
 . Т.е. есть ли отличный от описаного по ссылке метод получения этого 
 токена 
 авторизации?

 П,С, при посылке HTTP-запроса получаю ошибку вида 
 AuthenticationError.OAUTH_TOKEN_INVALID

 Буду признателен за ответы!



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/90665b39-6a41-4dbf-88e3-3d3d1eb6bb98%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: AdWords API Access from my MCC Account

2014-12-25 Thread Danial Klimkin
Hello,


Most likely it means this account is not an MCC account. Please try 
creating a new MCC account (you need a different email address for it).


-Danial, AdWords API Team.


On Wednesday, December 24, 2014 2:58:57 PM UTC+3, sr...@inspireinfosol.com 
wrote:

 Hello,

 I am unable to apply for AdWords API Access through my MCC account. There 
 is no AdWords API Center menu item available for me to click on to apply 
 for access. Can you please assist me with applying for API access?


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9fd3b2a1-ff32-454b-92e9-5242ea7faab7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ReportDownloadError.INVALID_PARAMETER, Trigger: Missing client information, FieldPath:

2014-12-25 Thread Danial Klimkin
Владимир, добрый день,


Судя по всему, вы не указываете ClientCustomerId. Нужно указать ID 
аккаунта, для которого запрашивается отчет.


-Даниил, команда AdWords API.


On Wednesday, December 24, 2014 2:56:16 PM UTC+3, Владимир Шангеев wrote:

 *1. Настройки:*
   AdWordsApi
 add key=UserAgent value=AdWordsApi/
 add key=DeveloperToken value=Х/
 add key=ХХХ-ХХХ-/
 add key='AuthorizationMethod' value='OAuth2' /
 add key='OAuth2ClientId' value='ХХ-ХХХ-.
 apps.googleusercontent.com' /
 add key='OAuth2ClientSecret' value='Х' /
 add key='OAuth2RefreshToken' 
 value='Х' /
   /AdWordsApi

 *2. Выполняется:*

 private void Start_Click(object sender, EventArgs e)
 {
 AdWordsUser user = new AdWordsUser();
 msg.Text = msg.Text + user.Config.OAuth2RefreshToken.ToString() + 
 Environment.NewLine;
 //Запрос отчета
 try
 {
 string query = @SELECT AccountDescriptiveName, CampaignName, Clicks FROM 
 CAMPAIGN_PERFORMANCE_REPORT WHERE Date = '2014.12.24';
 ReportUtilities utilities = new ReportUtilities(user, v201409, query,
 DownloadFormat.GZIPPED_CSV.ToString());
 using (ReportResponse response = utilities.GetResponse())
 {
 response.Save(D:\\testReport.csv);
 }
 int a = 0;
 }
 catch (Exception ex)
 {
 msg.Text = msg.Text + ex.ToString() + Environment.NewLine;
 }
 }



 * 3. ReportUtilities utilities = new ReportUtilities(user, v201409, 
 query, DownloadFormat.GZIPPED_CSV.ToString());  Возвращает ошибку:*

 Error: ReportDownloadError.INVALID_PARAMETER, Trigger: Missing client 
 information, FieldPath: 
  --- System.Net.WebException: Удаленный сервер возвратил ошибку: (400) 
 Недопустимый запрос.
в System.Net.HttpWebRequest.GetResponse()
в 
 Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReport(String 
 downloadUrl, String postBody)
--- Конец трассировки внутреннего стека исключений ---
в 
 Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.DownloadReport(String 
 downloadUrl, String postBody)
в Google.Api.Ads.AdWords.Util.Reports.ReportUtilities.GetReport()
в Google.Api.Ads.Common.Util.Reports.AdsReportUtilities.GetResponse()
в AdWordsApi.AdWordsApi.Start_Click(Object sender, EventArgs e) в 
 D:\Work\PR\AdWordsApi\AdWordsApi\AdWordsApi.cs:строка 37


 В чем ошибка? Где-то должно быть прописано поле FieldPath?


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/17a1a88d-4948-4c60-a343-ae52f8df861d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: ReportDownloadError.INVALID_PARAMETER, Trigger: Missing client information, FieldPath:

2014-12-25 Thread Владимир Шангеев


 Судя по всему, вы не указываете ClientCustomerId. Нужно указать ID 
 аккаунта, для которого запрашивается отчет.


Извините, пересмотрев настройки обнаружил, что не верно указал add 
key=ХХХ-ХХХ-/. 
Должно быть add key=ClientCustomerId value=ХХХ-ХХХ-/

Спасибо за ответ. 

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/89144057-f07d-43e0-af06-6ea84b36226c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Search Query Perf. Report missing FinalUrls

2014-12-25 Thread Danial Klimkin
Hello Joel,


Thank you for bringing this up, we'll review this request.


-Danial, AdWords API Team.


On Wednesday, December 24, 2014 5:34:41 PM UTC+3, joel wrote:

 The Search Query Performance Report has DestinationUrl but is missing 
 FinalUrls as an available column. Could this be added please ASAP? It seems 
 to me like every report that has DestinationUrl should include FinalUrl, 
 there might be others missing too? Thanks!

 Joel


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/cc58317a-fcbe-40c3-af19-f81d487062a1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How editting Ad and Keyword affect their ids and ad/keyword performance reports

2014-12-25 Thread Danial Klimkin
Hello Ben,


Ads and keywords are immutable. You can't modify it, you can only remove it 
and create a new one.

If you modify ad in the UI, it will remove the old one and create a new 
one for you behind the scenes. You, then, will be able to see both ads with 
separate stats.


-Danial, AdWords API Team.


On Thursday, December 25, 2014 2:54:59 AM UTC+3, Ben Zhang wrote:

 Hi I have a question about modifying ad and keyword in the middle of the 
 month. Take keyword for example. If I change a keyword slightly in the 
 middle of the month. If old keyword had 100 clicks, new keyword had 200 
 clicks for the month, will the monthly keyword performance report list them 
 as two separate rows? Will they have the same keyword id or different 
 keyword ids? Actually keywords performance report has no keywordId field. 
 Is criterionId field the equivalent of keywordId field?

 The same question applies to ad performance report as well because you can 
 also modify an ad.

 Any idea or comment would be appreciated!!!


-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/dea67701-3032-4ad7-b33e-0371c5762c3e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Получение токена авторизации AdWords без клиентской библиотеки

2014-12-25 Thread sneustroev
Вопрос теперь как использовать полученные параметры?
access_token посылать в soapenv:Header?
refresh_token - его где использовать?

четверг, 25 декабря 2014 г., 12:38:26 UTC+2 пользователь sneus...@treto.ru 
написал:

 Получил ответ когда послал запрос с текстом:

 grant_type=authorization_codeclient_secret=uteV8rw9T2E5O4p2JyMslRc5redirect_uri=urn:ietf:wg:oauth:2.0:oobclient_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 code=4/XM7FiGwgWf6SLDrEo2ivsp6H-AGM9rC8id42WuJCgjY.Ql0TPHPBSnwUYFZr95uygvVbQ_8BlQI
 Ответ вида:
 { 
 access_token: ХХ, 
 token_type: Bearer, 
 expires_in: 3600, 
 refresh_token: ХХХ, 
 id_token: ХХХ 
 }


 четверг, 25 декабря 2014 г., 12:24:11 UTC+2 пользователь Danial Klimkin 
 написал:

 В первую очередь, надо удалить данный OAuth клиент и создать новый. 
 ClientSecret не должен быть никому известен, а это публичный форум.

 1. Создайте новый клиент с типом installed application.

 2. Получение verification code. Для этого в браузере откройте ссылку:

 https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=
 YOUR_CLINET_ID
 redirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=
 https://www.googleapis.com/auth/adwords


 (нужно заполнить client ID)

 3. Получение refresh token. Можно с помощью curl:

 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 \
 https://accounts.google.com/o/oauth2/token

 (нужно заполнить все поля)

 4. Обновление access token:

 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 \

 https://accounts.google.com/o/oauth2/token


 -Даниил.

 On Thursday, December 25, 2014 10:29:39 AM UTC+3, sneus...@treto.ru 
 wrote:

 Посылаю запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer

 grant_type=authorization_code

 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground

 получаю ошибку:
 { 
 error_description: Missing required parameter: code, 
 error: invalid_request 
 }

 А если запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer


 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground;
 grant_type=authorization_code

 Тогда ошибка:
 {
 error_description: Required parameter is missing: grant_type,
 error: invalid_request
 } 

 Как можно ее решить? Уже все перепробовал...

 среда, 24 декабря 2014 г., 12:28:59 UTC+2 пользователь Danial Klimkin 
 написал:

 Добрый день,


 Без библиотек, процесс описан здесь:

   https://developers.google.com/accounts/docs/OAuth2WebServer


 -Даниил, команда AdWords API.


 On Tuesday, December 23, 2014 5:51:57 PM UTC+3, sneus...@treto.ru 
 wrote:

 Доброго времени суток!
 Может кто-то сталкивался, как можно получить токен авторизации без 
 использования клиентской библиотеки, как тут 
 https://developers.google.com/adwords/api/docs/guides/authentication?hl=ru
  
 . Т.е. есть ли отличный от описаного по ссылке метод получения этого 
 токена 
 авторизации?

 П,С, при посылке HTTP-запроса получаю ошибку вида 
 AuthenticationError.OAUTH_TOKEN_INVALID

 Буду признателен за ответы!



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/727e5a6b-ff99-485f-a166-6fe2496c41fe%40googlegroups.com.
For more 

Re: Получение токена авторизации AdWords без клиентской библиотеки

2014-12-25 Thread Danial Klimkin
Это как раз описано здесь:

  https://developers.google.com/adwords/api/docs/guides/authentication

лучше смотреть английскую версию.

refresh token используется для получения access token (шаг 4 в моем ответе 
ниже).

access token используется в каждом запросе, в HTTP headers как описано 
здесь:

  
https://developers.google.com/adwords/api/docs/guides/authentication#http_request_header


-Danial, AdWords API Team.



On Thursday, December 25, 2014 2:14:41 PM UTC+3, sneus...@treto.ru wrote:

 Вопрос теперь как использовать полученные параметры?
 access_token посылать в soapenv:Header?
 refresh_token - его где использовать?

 четверг, 25 декабря 2014 г., 12:38:26 UTC+2 пользователь sneus...@treto.ru 
 написал:

 Получил ответ когда послал запрос с текстом:

 grant_type=authorization_codeclient_secret=uteV8rw9T2E5O4p2JyMslRc5redirect_uri=urn:ietf:wg:oauth:2.0:oobclient_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 code=4/XM7FiGwgWf6SLDrEo2ivsp6H-AGM9rC8id42WuJCgjY.Ql0TPHPBSnwUYFZr95uygvVbQ_8BlQI
 Ответ вида:
 { 
 access_token: ХХ, 
 token_type: Bearer, 
 expires_in: 3600, 
 refresh_token: ХХХ, 
 id_token: ХХХ 
 }


 четверг, 25 декабря 2014 г., 12:24:11 UTC+2 пользователь Danial Klimkin 
 написал:

 В первую очередь, надо удалить данный OAuth клиент и создать новый. 
 ClientSecret не должен быть никому известен, а это публичный форум.

 1. Создайте новый клиент с типом installed application.

 2. Получение verification code. Для этого в браузере откройте ссылку:

 https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=
 YOUR_CLINET_ID
 redirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=
 https://www.googleapis.com/auth/adwords


 (нужно заполнить client ID)

 3. Получение refresh token. Можно с помощью curl:

 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 \
 https://accounts.google.com/o/oauth2/token

 (нужно заполнить все поля)

 4. Обновление access token:

 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 \

 https://accounts.google.com/o/oauth2/token


 -Даниил.

 On Thursday, December 25, 2014 10:29:39 AM UTC+3, sneus...@treto.ru 
 wrote:

 Посылаю запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer

 grant_type=authorization_code

 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground

 получаю ошибку:
 { 
 error_description: Missing required parameter: code, 
 error: invalid_request 
 }

 А если запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer


 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground;
 grant_type=authorization_code

 Тогда ошибка:
 {
 error_description: Required parameter is missing: grant_type,
 error: invalid_request
 } 

 Как можно ее решить? Уже все перепробовал...

 среда, 24 декабря 2014 г., 12:28:59 UTC+2 пользователь Danial Klimkin 
 написал:

 Добрый день,


 Без библиотек, процесс описан здесь:

   https://developers.google.com/accounts/docs/OAuth2WebServer


 -Даниил, команда AdWords API.


 On Tuesday, December 23, 2014 5:51:57 PM UTC+3, sneus...@treto.ru 
 wrote:

 Доброго времени суток!
 Может кто-то сталкивался, как можно получить токен авторизации без 
 использования клиентской библиотеки, как тут 
 https://developers.google.com/adwords/api/docs/guides/authentication?hl=ru
  
 . Т.е. есть ли отличный от описаного по ссылке метод получения этого 
 токена 
 авторизации?

 П,С, при посылке HTTP-запроса получаю ошибку вида 
 AuthenticationError.OAUTH_TOKEN_INVALID

 Буду признателен за ответы!



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this 

Re: Получение токена авторизации AdWords без клиентской библиотеки

2014-12-25 Thread sneustroev
Я по этому описанию и делаю...
добавляю в HTTP request header Authorization: Bearer THE_ACCESS_TOKEN
Далее отправляю:

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:clientCustomerIdxxx-xxx-/ns1:clientCustomerId
  ns1:developerTokenВАШ_ТОКЕН_РАЗРАБОТЧИКА/ns1:developerToken
  ns1:userAgentНАЗВАНИЕ_ВАШЕГО_ПРИЛОЖЕНИЯ/ns1:userAgent
  ns1:validateOnlyfalse/ns1:validateOnly
  ns1:partialFailurefalse/ns1:partialFailure
/ns1:RequestHeader
  /soapenv:Header

В итоге получаю - OAUTH_TOKEN_INVALID

четверг, 25 декабря 2014 г., 13:41:52 UTC+2 пользователь Danial Klimkin 
написал:

 Это как раз описано здесь:

   https://developers.google.com/adwords/api/docs/guides/authentication

 лучше смотреть английскую версию.

 refresh token используется для получения access token (шаг 4 в моем ответе 
 ниже).

 access token используется в каждом запросе, в HTTP headers как описано 
 здесь:

   
 https://developers.google.com/adwords/api/docs/guides/authentication#http_request_header


 -Danial, AdWords API Team.



 On Thursday, December 25, 2014 2:14:41 PM UTC+3, sneus...@treto.ru wrote:

 Вопрос теперь как использовать полученные параметры?
 access_token посылать в soapenv:Header?
 refresh_token - его где использовать?

 четверг, 25 декабря 2014 г., 12:38:26 UTC+2 пользователь 
 sneus...@treto.ru написал:

 Получил ответ когда послал запрос с текстом:

 grant_type=authorization_codeclient_secret=uteV8rw9T2E5O4p2JyMslRc5redirect_uri=urn:ietf:wg:oauth:2.0:oobclient_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 code=4/XM7FiGwgWf6SLDrEo2ivsp6H-AGM9rC8id42WuJCgjY.Ql0TPHPBSnwUYFZr95uygvVbQ_8BlQI
 Ответ вида:
 { 
 access_token: ХХ, 
 token_type: Bearer, 
 expires_in: 3600, 
 refresh_token: ХХХ, 
 id_token: ХХХ 
 }


 четверг, 25 декабря 2014 г., 12:24:11 UTC+2 пользователь Danial Klimkin 
 написал:

 В первую очередь, надо удалить данный OAuth клиент и создать новый. 
 ClientSecret не должен быть никому известен, а это публичный форум.

 1. Создайте новый клиент с типом installed application.

 2. Получение verification code. Для этого в браузере откройте ссылку:

 https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=
 YOUR_CLINET_ID
 redirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=
 https://www.googleapis.com/auth/adwords


 (нужно заполнить client ID)

 3. Получение refresh token. Можно с помощью curl:

 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 \
 https://accounts.google.com/o/oauth2/token

 (нужно заполнить все поля)

 4. Обновление access token:

 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 \

 https://accounts.google.com/o/oauth2/token


 -Даниил.

 On Thursday, December 25, 2014 10:29:39 AM UTC+3, sneus...@treto.ru 
 wrote:

 Посылаю запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer

 grant_type=authorization_code

 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground

 получаю ошибку:
 { 
 error_description: Missing required parameter: code, 
 error: invalid_request 
 }

 А если запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer


 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground;
 grant_type=authorization_code

 Тогда ошибка:
 {
 error_description: Required parameter is missing: grant_type,
 error: invalid_request
 } 

 Как можно ее решить? Уже все перепробовал...

 среда, 24 декабря 2014 г., 12:28:59 UTC+2 пользователь Danial Klimkin 
 написал:

 Добрый день,


 Без библиотек, процесс описан здесь:

   https://developers.google.com/accounts/docs/OAuth2WebServer


 -Даниил, команда AdWords API.


 On Tuesday, December 23, 2014 5:51:57 PM UTC+3, sneus...@treto.ru 
 wrote:

 Доброго времени суток!
 Может кто-то сталкивался, как можно получить токен авторизации без 
 использования клиентской библиотеки, как тут 
 

Re: Получение токена авторизации AdWords без клиентской библиотеки

2014-12-25 Thread Danial Klimkin
Ну, во-первых, версия v201402 уже не доступна:

  https://developers.google.com/adwords/api/docs/sunset-dates

Убедитесь что подствляете access token, а не refresh token. Так же, access 
token действителен только 1 час после получения, через час нужно получать 
новый используюя refresh token.


-Даниил.



On Thursday, December 25, 2014 3:13:49 PM UTC+3, sneus...@treto.ru wrote:

 Я по этому описанию и делаю...
 добавляю в HTTP request header Authorization: Bearer THE_ACCESS_TOKEN
 Далее отправляю:

 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:clientCustomerIdxxx-xxx-/ns1:clientCustomerId
   ns1:developerTokenВАШ_ТОКЕН_РАЗРАБОТЧИКА/ns1:developerToken
   ns1:userAgentНАЗВАНИЕ_ВАШЕГО_ПРИЛОЖЕНИЯ/ns1:userAgent
   ns1:validateOnlyfalse/ns1:validateOnly
   ns1:partialFailurefalse/ns1:partialFailure
 /ns1:RequestHeader
   /soapenv:Header

 В итоге получаю - OAUTH_TOKEN_INVALID

 четверг, 25 декабря 2014 г., 13:41:52 UTC+2 пользователь Danial Klimkin 
 написал:

 Это как раз описано здесь:

   https://developers.google.com/adwords/api/docs/guides/authentication

 лучше смотреть английскую версию.

 refresh token используется для получения access token (шаг 4 в моем 
 ответе ниже).

 access token используется в каждом запросе, в HTTP headers как описано 
 здесь:

   
 https://developers.google.com/adwords/api/docs/guides/authentication#http_request_header


 -Danial, AdWords API Team.



 On Thursday, December 25, 2014 2:14:41 PM UTC+3, sneus...@treto.ru wrote:

 Вопрос теперь как использовать полученные параметры?
 access_token посылать в soapenv:Header?
 refresh_token - его где использовать?

 четверг, 25 декабря 2014 г., 12:38:26 UTC+2 пользователь 
 sneus...@treto.ru написал:

 Получил ответ когда послал запрос с текстом:

 grant_type=authorization_codeclient_secret=uteV8rw9T2E5O4p2JyMslRc5redirect_uri=urn:ietf:wg:oauth:2.0:oobclient_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 code=4/XM7FiGwgWf6SLDrEo2ivsp6H-AGM9rC8id42WuJCgjY.Ql0TPHPBSnwUYFZr95uygvVbQ_8BlQI
 Ответ вида:
 { 
 access_token: ХХ, 
 token_type: Bearer, 
 expires_in: 3600, 
 refresh_token: ХХХ, 
 id_token: ХХХ 
 }


 четверг, 25 декабря 2014 г., 12:24:11 UTC+2 пользователь Danial Klimkin 
 написал:

 В первую очередь, надо удалить данный OAuth клиент и создать новый. 
 ClientSecret не должен быть никому известен, а это публичный форум.

 1. Создайте новый клиент с типом installed application.

 2. Получение verification code. Для этого в браузере откройте ссылку:


 https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=
 YOUR_CLINET_ID
 redirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=
 https://www.googleapis.com/auth/adwords


 (нужно заполнить client ID)

 3. Получение refresh token. Можно с помощью curl:

 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 \
 https://accounts.google.com/o/oauth2/token

 (нужно заполнить все поля)

 4. Обновление access token:

 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 \

 https://accounts.google.com/o/oauth2/token


 -Даниил.

 On Thursday, December 25, 2014 10:29:39 AM UTC+3, sneus...@treto.ru 
 wrote:

 Посылаю запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer

 grant_type=authorization_code

 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground

 получаю ошибку:
 { 
 error_description: Missing required parameter: code, 
 error: invalid_request 
 }

 А если запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer


 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground;
 grant_type=authorization_code

 Тогда ошибка:
 {
 error_description: Required parameter is missing: grant_type,
 error: invalid_request
 } 

 Как можно ее решить? Уже все перепробовал...

 среда, 24 декабря 2014 г., 12:28:59 UTC+2 пользователь Danial Klimkin 
 написал:

 Добрый день,


 Без 

Re: Получение токена авторизации AdWords без клиентской библиотеки

2014-12-25 Thread sneustroev
То в примере v201402 , я пользуюсь v201409.
Нет токены не перепутал

четверг, 25 декабря 2014 г., 15:35:40 UTC+2 пользователь Danial Klimkin 
написал:

 Ну, во-первых, версия v201402 уже не доступна:

   https://developers.google.com/adwords/api/docs/sunset-dates

 Убедитесь что подствляете access token, а не refresh token. Так же, access 
 token действителен только 1 час после получения, через час нужно получать 
 новый используюя refresh token.


 -Даниил.



 On Thursday, December 25, 2014 3:13:49 PM UTC+3, sneus...@treto.ru wrote:

 Я по этому описанию и делаю...
 добавляю в HTTP request header Authorization: Bearer THE_ACCESS_TOKEN
 Далее отправляю:

 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:clientCustomerIdxxx-xxx-/ns1:clientCustomerId
   ns1:developerTokenВАШ_ТОКЕН_РАЗРАБОТЧИКА/ns1:developerToken
   ns1:userAgentНАЗВАНИЕ_ВАШЕГО_ПРИЛОЖЕНИЯ/ns1:userAgent
   ns1:validateOnlyfalse/ns1:validateOnly
   ns1:partialFailurefalse/ns1:partialFailure
 /ns1:RequestHeader
   /soapenv:Header

 В итоге получаю - OAUTH_TOKEN_INVALID

 четверг, 25 декабря 2014 г., 13:41:52 UTC+2 пользователь Danial Klimkin 
 написал:

 Это как раз описано здесь:

   https://developers.google.com/adwords/api/docs/guides/authentication

 лучше смотреть английскую версию.

 refresh token используется для получения access token (шаг 4 в моем 
 ответе ниже).

 access token используется в каждом запросе, в HTTP headers как описано 
 здесь:

   
 https://developers.google.com/adwords/api/docs/guides/authentication#http_request_header


 -Danial, AdWords API Team.



 On Thursday, December 25, 2014 2:14:41 PM UTC+3, sneus...@treto.ru 
 wrote:

 Вопрос теперь как использовать полученные параметры?
 access_token посылать в soapenv:Header?
 refresh_token - его где использовать?

 четверг, 25 декабря 2014 г., 12:38:26 UTC+2 пользователь 
 sneus...@treto.ru написал:

 Получил ответ когда послал запрос с текстом:

 grant_type=authorization_codeclient_secret=uteV8rw9T2E5O4p2JyMslRc5redirect_uri=urn:ietf:wg:oauth:2.0:oobclient_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 code=4/XM7FiGwgWf6SLDrEo2ivsp6H-AGM9rC8id42WuJCgjY.Ql0TPHPBSnwUYFZr95uygvVbQ_8BlQI
 Ответ вида:
 { 
 access_token: ХХ, 
 token_type: Bearer, 
 expires_in: 3600, 
 refresh_token: ХХХ, 
 id_token: ХХХ 
 }


 четверг, 25 декабря 2014 г., 12:24:11 UTC+2 пользователь Danial 
 Klimkin написал:

 В первую очередь, надо удалить данный OAuth клиент и создать новый. 
 ClientSecret не должен быть никому известен, а это публичный форум.

 1. Создайте новый клиент с типом installed application.

 2. Получение verification code. Для этого в браузере откройте ссылку:


 https://accounts.google.com/o/oauth2/auth?access_type=offlineclient_id=
 YOUR_CLINET_ID
 redirect_uri=urn:ietf:wg:oauth:2.0:oobresponse_type=codescope=
 https://www.googleapis.com/auth/adwords


 (нужно заполнить client ID)

 3. Получение refresh token. Можно с помощью curl:

 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 \
 https://accounts.google.com/o/oauth2/token

 (нужно заполнить все поля)

 4. Обновление access token:

 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 \

 https://accounts.google.com/o/oauth2/token


 -Даниил.

 On Thursday, December 25, 2014 10:29:39 AM UTC+3, sneus...@treto.ru 
 wrote:

 Посылаю запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer

 grant_type=authorization_code

 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground

 получаю ошибку:
 { 
 error_description: Missing required parameter: code, 
 error: invalid_request 
 }

 А если запрос:
 POST /oauth2/v3/token HTTP/1.1
 Host: ссылка http://_http//www.googleapis.com
 Content-length: 297
 Content-type: application/x-www-form-urlencoded'
 Authorization: Bearer


 code=4/i6TpcMwelL81Hk-EZgsE9NTaEyxrR84lygze2Ig-F3A.AiphZauHhU8eYFZr95uygvWRnlL5lAI
 client_id=
 260377337994-n2pn193ne3li1ko4rgjfim0lni37svq8.apps.googleusercontent.com
 
 client_secret=uteV8rw9T2E5O4p2JyMslRc5
 redirect_uri=https://developers.google.com/oauthplayground;
 grant_type=authorization_code

 Тогда ошибка:
 {
 error_description: Required parameter is missing: grant_type,
 error: invalid_request
 

Re: Получение токена авторизации AdWords без клиентской библиотеки

2014-12-25 Thread sneustroev
Не подскажите, access token имеет какой-то срок действия, не нужно ли его 
каждый раз при подключении получать?
Т.е. если я обращаюсь к веб-сервису, то перед этим не нужно ли каждый раз 
пролучать access token, а уже потом выполнять метод веб-сервиса?

четверг, 25 декабря 2014 г., 15:35:40 UTC+2 пользователь Danial Klimkin 
написал:

 Ну, во-первых, версия v201402 уже не доступна:

   https://developers.google.com/adwords/api/docs/sunset-dates

 Убедитесь что подствляете access token, а не refresh token. Так же, access 
 token действителен только 1 час после получения, через час нужно получать 
 новый используюя refresh token.



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4c73ae01-5a83-4e34-93bc-68cd5c0ccc9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ class campaignmgmt.campaign.MutateAction (ADD) requires CREATE_CAMPAIGN

2014-12-25 Thread Abhinash Dora
Thanks Josh and Danial, finally able to create campaign succesfully.

Cheers,
Abhinash

On Wednesday, December 24, 2014 3:55:47 PM UTC+5:30, Danial Klimkin wrote:

 Hello Abhinash,


 You need to create a non-MCC account under the test MCC. You can use the 
 ManagedCustomerService 
 https://developers.google.com/adwords/api/docs/reference/v201409/ManagedCustomerService
  
 or do this via the user interface.


 -Danial, AdWords API Team.


 On Wednesday, December 24, 2014 9:00:46 AM UTC+3, Abhinash Dora wrote:

 Hello, 
 Can you suggest me which clientCustomerId I should use to create 
 campaigns in the test account.

 Regards,
 Abhinash


 On Monday, December 22, 2014 6:53:48 PM UTC+5:30, Danial Klimkin wrote:

 Hello Abhinash,


 Please make sure the clientCustomerId you are setting is not for an MCC 
 account. You can't create campaigns on the MCC level.


 -Danial, AdWords API Team.


 On Monday, December 22, 2014 12:52:39 PM UTC+3, Abhinash Dora wrote:


 Hi Josh,

 I have tried without setting *operation.OperationType, *but still 
 getting the same error.
 My Code is: 
 CampaignService campaignService = 
 (CampaignService)user.GetService(AdWordsService.v201409.CampaignService);

 campaignService.RequestHeader.clientCustomerId = 
 ConfigurationManager.AppSettings[ClientCustomerId];

 CampaignOperation operation = new CampaignOperation();
 operation.@operator = Operator.ADD;
 operation.operand = campaign;

 ListCampaignOperation operations = new ListCampaignOperation();
 operations.Add(operation);

 CampaignReturnValue retVal = 
 campaignService.mutate(operations.ToArray());

 Last line gives error.
 Can you have any other solution.


 On Friday, December 19, 2014 8:47:46 PM UTC+5:30, Josh Radcliff 
 (AdWords API Team) wrote:

 Hi,

 Have you tried *not* setting *operation.OperationType*? That value 
 isn't required, and by setting it to a value that the API doesn't 
 recognize 
 you may be triggering that error.

 You may want to check out the AddCampaigns.cs example 
 https://github.com/googleads/googleads-dotnet-lib/blob/master/examples/AdWords/CSharp/v201409/BasicOperations/AddCampaigns.cs
  and 
 compare it to how you are setting up your operations.

 Thanks,
 Josh, AdWords API Team

 On Friday, December 19, 2014 7:36:00 AM UTC-5, Abhinash Dora wrote:

 I have searched for the error but didn't find any solution.

 CampaignOperation operation = new CampaignOperation();
 operation.OperationType = CREATE_CAMPAIGN;
 operation.@operator = Operator.ADD;
 operation.operand = campaign;
 
 CampaignOperation[] operations = new CampaignOperation[] 
 { operation };



 CampaignService campaignService = 
 (CampaignService)user.GetService(AdWordsService.v201409.CampaignService);

 campaignService.RequestHeader.clientCustomerId = 
 ConfigurationManager.AppSettings[ClientCustomerId];
 
 CampaignReturnValue retVal = 
 campaignService.mutate(operations);

 When I tried to execute the last line CampaignReturnValue retVal = 
 campaignService.mutate(operations);, It gives error 
 OperationAccessDenied.ADD_OPERATION_NOT_PERMITTED @ class 
 campaignmgmt.campaign.MutateAction (ADD) requires CREATE_CAMPAIGN .

 Please help me to resolve me this issue.



-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups AdWords API Forum group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
AdWords API Forum group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/4fa6a940-a64e-457b-873e-e01f1a821e49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.