-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/content/v2/accounts/authinfo?alt=json returned "Insufficient Permission"> #751
Comments
It sounds like the credentials you are using don't have sufficient permission. Would you be able to provide a code sample? |
Sure..you mean Python sample code? it is here: https://github.com/googleads/googleads-shopping-samples/tree/master/python The client-secret.json file gets created automatically by going to this link: https://console.developers.google.com/apis/credentials |
@castnow123 Which sample file specifically are you running? It looks like you are using python 2.7. Do you know which version of the client library you are using? In addition, please review the instructions here and here and confirm that you've followed the relevant steps for getting credentials. |
@busunkim96 even if I run it using python3 it gives the error. The client library is v2.1 I shared some screenshots of client-secrets.json after removing sensitive information. |
Hmm, the client library is currently at version 1.7.11. Would you mind double-checking the library version? If you installed using pip, this will give you the version number:
There are instructions here on setting up authentication for the shopping samples. If you're using a service account, it looks like you should name the file |
@busunkim96 Yes, I am using 1.7.11 I setup OAuth2 client ID as in the screenshot attached. I named the json to client-secrets.json. but I still rceived this error. do you have skype so I can share my screen and show you? did you try to authenticate using python and you are not getting any errors? Using application default credentials. |
And you said you've added the account to Merchant Center?
I'm going to redirect you to the Content API folks who wrote the Python samples. I unfortunately can't help debug any further as I don't have access to the Merchant center platform. |
@castnow123 Please file your issue on the Google Content API for Shopping forum |
yes I did all of the above when I wanted to authenticate using service account but that did not work too. |
@castnow123 Alright, please let the Content API for Shopping team know at their forum. They should be able to help debug the Authorization issue. Apologies for not being able to be more of a help. |
Hi
I tried for several days to establish a Content API connection via Python for Google Shopping but I am getting permission denied. I have been advised to post the issue here as it seems to be library specific.
1- I set up a special directory to dumpy two json files. /home/castnow2019_gmail_com/shopping-samples/content. I dumped 2 JSONs files:
client-secrets.json merchant-info.json
2- Created a different directory that has Python code in /home/castnow2019/google/env/google-shopping/googleads-shopping-samples/python$
3- I ran pip install -r requirements.txt
4- I ran python -m shopping.content.products.list
but I received this error message:
File "/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py", line 856, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/content/v2/accounts/authinfo?alt=json returned "Insufficient Permission">
how do I solve this issue?
The text was updated successfully, but these errors were encountered: