I suggest you to read this as the best starting point for Google API with OAuth2, and in your case you need this: OAuth2 for Devices. Probably you are using the wrong endpoint, to request for a user code, you need to use the following endpoint: https://accounts.google.com/o/oauth2/device/code This is an example using curl (in your case to authorize the access to the Google+ API): curl https://acco