I recently met both Google Cloud Print and OAuth, so I don't know much. I started the same way you start. That is, trying to make a successful /search request. I will describe what worked for me.
After creating the project in the Cloud Console, I went to the API menu item and auth > Credentials and created a new client identifier for the Web Application type of application.
For the generated client ID, I correctly changed the Javascript Origins and the redirect URI .
Then I added a binding to the following URL in my web application so that the user gets to the authentication page.
https://accounts.google.com/o/oauth2/auth? response_type=token& client_id=<application-client-id>& scope=https://www.googleapis.com/auth/cloudprint& redirect_uri=<application-redirect-uri>
client_id - there must be a client_id value for the identifier of the client registered in the Google Cloud Console.
response_type . This value will depend on which application you plan to develop. For client applications (JavaScript applications), the token must be a value. See https://developers.google.com/accounts/docs/OAuth2 for more information on this topic.
redirect_uri - There must be a redirect URI value that you specified in the client ID registered in the Google Cloud console. Here, the user will be redirected when authenticated.
area . I installed it at https://www.googleapis.com/auth/cloudprint . This value will request access to your cloud printer management application associated with the authenticated user account.
Now the part where I'm stuck is trying to make an HTTP request using JavaScript (AJAX) at https://www.google.com/cloudprint/search . I get the following response when I try to execute an HTTP / search request.
OPTIONS https://www.google.com/cloudprint/search No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
It seems that the object (server (s)) that processes the request in the /search interface is not configured to use CORS? Correct me if I am wrong.
Now, as I made sure that I was able to authenticate successfully, I tried to execute the /search request in a Java program. I used the OAuth token that I received when authenticating with my web application in a java program and made a request using the Authorization: OAuth <token> header set), and the request was successful.