Google Cloud Print OAuth Area Not Found

I am creating an application that prints a PDF file from the server after it is created.

When using Google Cloud Print, I always get:

User credentials required Error 403 

Note: fulfilling this print request in page modeling works fine, but that is because I am already registered with my google account.

After some research, I found out that I needed to use OAuth to get an access token to send with a request to complete a print job.

And every page I can find tells me to redirect me to: https://www.googleapis.com/auth/cloudprint , which gives me a 404 error, and I canโ€™t find it on google play area, and using any old Authentication versions end up with a write request marked as a hacker attack.

Is there any way around this?

+6
source share
1 answer

I was stuck on this for a while. Documents do not tell you which area to use or how to use it. I have not yet implemented the Google API using OAuth2, so I did not have an understanding of how the scope works.

Turns out scope is just the base API route for CloudPrint.

To ensure that your refresh_token or access_token is used correctly to use the CloudPrint API, you need to use the following line in the scope object:

https://www.googleapis.com/auth/cloudprint

+2
source

Source: https://habr.com/ru/post/975943/


All Articles