One other piece of information is that in Google Developer's Console, my Client ID is for a "native application", which wasn't specified anywhere in the documentation but seems to be heavily implied by the default (and unchangeable) Redirect Uris. I can also retrieve fresh access tokens utilizing the refresh token, though that API isn't quite correctly documented either I need to replace "code" with "refresh_token", but the error message it gave was at least useful. Here is the POST for Step 6 being sent (with my client IDs hidden): POST /o/oauth2/token HTTP/1.1Ĭontent-Type: application/x-Please note that this exact same request works perfectly when I get an auth code for a specific user that grants access to the APIs. I've been mostly using to simulate the various http posts to Google, so I don't really have any code to show at the moment. I have a theoretical work-around by having the user explicitly allow my project access to the /cloudprint and /googletalk APIs, then using the access and refresh tokens from the user's login to control the printer, but I'm afraid the robot account's JabberId will be inaccessible, as I have never exchanged the Auth code successfully. The printer is supposed to have its own access token to utilize the cloud print API and receive XMPP messages (jobs, etc.). I'm having trouble with step 6, as it always returns a 401: unauthorized_client error.Īs I understand it from the documentation, at step 1, Google is creating a "Robot" (or Service) account for the printer, and the user is only associating themselves with this account as the owner. Printer exchanges Auth code for Access/Refresh tokens. Once claimed, printer gets an Auth Code.Printer makes an unauthenticated request to /register.I've read every piece of documentation and troubleshooting I can find, and I'm still stumped.įull details of Google's instructions can be read here. I am trying to create a C# project that will walk a user through the registration of a new Google Cloud Print Printer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |