Re: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request "error" : "invalid_user"

2017-01-03 Thread ВІталій Мозок
HI Vishal! Sory for my pure engliish. I have same issue.

want to upload sitelinks using googleads-php-lib 


I tried using the following example: 
https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201609/Extensions/AddSitelinks.php
.

My steps. 
1. Create project in api console and create credentials type other. clientId 
and clientSecret
i copied to [OATH2] section in adsapi_php.ini.
2.I turned on all adwords apis in project.
3. I got developer token and copied it with client id to [ADWORDS] 
section in adsapi_php.ini.
4. I also obtained the refresh token using the code found in 
GetRefreshToken.php 
and I copied to [OATH2] section in adsapi_php.ini.

But when executing the scripts I get the following 400 response:

Exeption 400 Bad Request` response: { "error": "invalid_client",
"error_description": "Bad Request" } after line $customers =
$customerService->getCustomers();


Thanks!

On Tuesday, December 27, 2016 at 10:54:12 PM UTC+2, Vishal Vinayak (Adwords 
API Team) wrote:
>
> Hi,
>
> Looks like this error is related to your OAuth credentials and not your 
> developer token. Could you provide me with the steps that you followed to 
> create OAuth credentials? 
>
> Regards,
> Vishal, AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/d19c8e93-c00f-496d-8a3f-276afbcc07ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request "error" : "invalid_user"

2016-12-27 Thread 'Vishal Vinayak (Adwords API Team)' via AdWords API Forum
Hi,

Looks like this error is related to your OAuth credentials and not your 
developer token. Could you provide me with the steps that you followed to 
create OAuth credentials? 

Regards,
Vishal, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c467a1c3-7b7a-4ca0-a3a3-fd608d21f3b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request "error" : "invalid_user"

2016-12-27 Thread google_mingzhu
I just applied for AdWords API permission, the test account. After I create 
the test account,  I collected data via the it and developerToken. However, 
it shows error as follows. I wanna know the reason for this. 
Is it because that I can only collect data after activating developerToken? 

Exception in thread "main" 
com.google.api.ads.common.lib.exception.OAuthException: Credential could 
not be refreshed.
at 
com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:178)
at 
adwords.axis.v201609.basicoperations.GetCampaigns.main(GetCampaigns.java:45)
Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 
Bad Request
{
  "error" : "invalid_user"
}
at 
com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
at 
com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
at 
com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
at 
com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
at 
com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:362)
at 
com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
at 
com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:69)
at 
com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:172)
... 1 more

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a7c3e2c6-f813-4cce-9b90-5c8ce590bd63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request "error" : "invalid_user"

2016-12-27 Thread google_mingzhu
I just applied for AdWords API permission, the test account. After I create 
the test account,  I collected data via the it and developerToken. However, 
it shows error as follows. I wanna know the reason for this. 
Is it because that I can only collect data after activating developerToken? 

Exception in thread "main" 
com.google.api.ads.common.lib.exception.OAuthException: Credential could 
not be refreshed.
at 
com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:178)
at 
adwords.axis.v201609.basicoperations.GetCampaigns.main(GetCampaigns.java:45)
Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 
Bad Request
{
  "error" : "invalid_user"
}
at 
com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
at 
com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
at 
com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
at 
com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
at 
com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:362)
at 
com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
at 
com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:69)
at 
com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:172)
... 1 more

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/b0460ab2-f981-4fca-8d26-344a6c2d386b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


com.google.api.client.auth.oauth2.TokenResponseException: 400 Bad Request "error" : "invalid_user"

2016-12-27 Thread gamepiphk
I just applied for AdWords API permission, the test account. After I create 
the test account,  I collected data via the it and developerToken. However, 
it shows error as follows. I wanna know the reason for this. 
Is it because that I can only collect data after activating developerToken? 

Exception in thread "main" 
com.google.api.ads.common.lib.exception.OAuthException: Credential could 
not be refreshed.
at 
com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:178)
at 
adwords.axis.v201609.basicoperations.GetCampaigns.main(GetCampaigns.java:45)
Caused by: com.google.api.client.auth.oauth2.TokenResponseException: 400 
Bad Request
{
  "error" : "invalid_user"
}
at 
com.google.api.client.auth.oauth2.TokenResponseException.from(TokenResponseException.java:105)
at 
com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:287)
at 
com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:307)
at 
com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:570)
at 
com.google.api.client.googleapis.auth.oauth2.GoogleCredential.executeRefreshToken(GoogleCredential.java:362)
at 
com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:489)
at 
com.google.api.ads.common.lib.auth.OAuth2Helper.callRefreshToken(OAuth2Helper.java:69)
at 
com.google.api.ads.common.lib.auth.OfflineCredentials.generateCredential(OfflineCredentials.java:172)
... 1 more

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/a26f32c2-bda5-4c71-9ac3-654db99bec20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.