0

I've seen these questions about using Postman in order to invoke Google's API with OAuth 2:

Using Postman to access OAuth 2.0 Google APIs

Could not obtain Google oAuth 2 token on POSTMan

and many more, but they all have client ID and client secret.

For the 'Save to Android Pay' API, all I got is a .p12 key and an issuer ID. I also have Service Account Email Address but defiantly no client id or secret. I think I also have the Auth URL but I'm not sure: https://www.googleapis.com/auth/wallet_object.issuer

Looking in the Save to Android Pay API, doesn't say anything about a client id so I'm really not sure how I'm supposed to obtain a token in POSTMAN with what I have.

So my question is: giving a .p12 key, an issuerId and a Service Account Email Address, What do I need to fill in POSTMAN OAuth 2 fields:

Token Name, Auth URL, Access Token URL, Client ID, Client Secret, Scope (Optional), Grant Type

Community
  • 1
  • 1
DMEM
  • 1,573
  • 8
  • 25
  • 43

1 Answers1

0

To obtain OAuth 2.0 client credentials, you need to register an application to the Google API Console as specify in the basic steps and then you'll get a client ID and client secret.

Rémi Lavolée
  • 48
  • 1
  • 11
  • According to this tutorial I need to: "Visit the Google API Console to obtain OAuth 2.0 credentials such as a client ID and client secret" but there is no explanation on how to do it. When I'm logged in the Google API Console I see nothing about OAuth 2.0. Can you please elaborate? – DMEM Nov 17 '16 at 16:53
  • You'll see `OAuth 2.0` content in the `credentials` section. – Rémi Lavolée Nov 17 '16 at 17:27
  • thanks. So I got clientID and secret but I'm still missing: Token Name, Auth URL, Access Token URL, Grant Type – DMEM Nov 17 '16 at 20:23
  • I don't understand why you those values. According to the last section of [Save to Android Pay API](https://developers.google.com/save-to-android-pay/guides/basic-setup#3-use-oauth-20-for-your-server-to-server-application) you need service account credentials. Everything is written in the [OAuth2ServiceAccount](https://developers.google.com/identity/protocols/OAuth2ServiceAccount#Overview) article. There is a [Google APIs Client Library for Java](https://github.com/google/google-api-java-client#Service_Accounts) that helps to correctly generate service account credentials. – Rémi Lavolée Nov 18 '16 at 09:31
  • My only goal is to generate a 'Save To Android Pay' request to the API with POSTMAN... I have no problem generating other requests like google maps API or google URL shorter, The problem is only with 'Save to Android Pay' API. I also have no problem generating the 'Save to Android Pay' request from PHP or JAVA code *By using the `p12` key file. My goal is to do it using POSTMAN* – DMEM Nov 18 '16 at 15:18