1

I am using login with amazon in android. I got all the certificate like(SHA256,MD5 for release mode) and its working fine in release mode but when i publish in Google play store it showing me api key error.

java.lang.IllegalArgumentException: Invalid API Key

Any help is appreciated,thx.

Levon Petrosyan
  • 8,815
  • 8
  • 54
  • 65
Kumar
  • 11
  • 2

2 Answers2

3

You are using Upload-Cert SHA, You should change your API SHA to Play Store App-Signing SHA.

Berat Eyüboğlu
  • 1,663
  • 3
  • 18
  • 32
0

thanks to @ Berat Eyüboğlu now my problem is solved. i just want to add more details. After following all the steps we need to run command(for that java have to install in the system) keytool -printcert -file your.RSA after that i got all the certificate that i used for api key.

Steps

  1. go to build Generate Signed Apk (in android studio)

  2. After getting signed apk just rename the APK extension to ZIP if necessary Unzip the APK file and extract CERT.RSA .

  3. run this command in command prompt keytool -printcert -file CERT.RSA. (Keytool is located in the java/jdk/bin in windows) all the certificate like MD5,SHA1,SHA256 display command prompt.Use that details for API key.
Kumar
  • 11
  • 2