Google cloud print OAuth scope not found
Asked Answered
M

1

9

I'm creating an app that prints out a pdf from the server after it has been generated.

When using google cloud print I keep getting:

User credentials required
Error 403

Note: making this print request in the simulating page works fine, but that's because I'm already logged into my google account.

After doing some research I found out I need to use OAuth to get an access token to send with the request to make a print job.

And every single page I can find tells me to redirect me to: https://www.googleapis.com/auth/cloudprint, which gives me a 404 error, neither can I find it in the google playground, and using any older versions of authentication ends up in the request to sign in being flagged as an attack from a hacker.

Is there any way around this?

Menendez answered 27/9, 2014 at 21:1 Comment(2)
What code are you using to call the API?Larrainelarrie
@Larrainelarrie I posted this question over a year ago, I don't have any code I used anymoreMenendez
O
8

I was stuck on this for a while. The docs don't tell you which scope to use or how to use it. I haven't implemented a Google API using OAuth2 yet, so I didn't have an understanding of how the scoping works.

It turns out the scope is just the base API route for CloudPrint.

To make sure your refresh_token or access_token is scoped properly to use the CloudPrint API you need to use have the following string in your scope object:

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

Ornelas answered 7/3, 2016 at 5:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.