Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

For Google API Access, can I create multiple Client IDs for the same Android package name?

I am following the Quickstart guide here to get Google Drive integration with my android app: https://developers.google.com/drive/quickstart-android .

So I created two Client IDs using the debug and release SHA1 fingerprints for the same package name. The API Console allowed this, but I was wondering since I created the Client ID with the debug key SHA1 fingerprint, will the Google OAuth2 server accept authentication request coming from my release apps?

By the way, I am using Google Play Services API to request auth token, so there's no way to specify the 'Client ID' string shown in the API Console.

like image 510
azgolfer Avatar asked Dec 10 '12 15:12

azgolfer


People also ask

What is client ID in API?

A Client ID is an identifier associated with an application that assists with client / server OAuth 2.0 authentication for ArcGIS client APIs . Developers create a client ID by defining an application on their developer dashboard.

What is Clientid and Clientsecret?

The Client ID is a public identifier of your application. The Client Secret is confidential and should only be used to authenticate your application and make requests to LinkedIn's APIs.


1 Answers

You don't need to specify the Client ID in your code because your credentials are matched using the package name/SHA1 fingerprint pair, which is unique.

As you generated credentials for both the debug and release certificate, your requests will be authorized correctly as long as your app uses either of those with the package name specified in the APIs Console.

like image 58
Claudio Cherubino Avatar answered Oct 24 '22 20:10

Claudio Cherubino