3

I have created API key for TimeZone API and restrict it by check on TimeZone API checkbox in restriction and upload apk to google store but after some days google gave alert that Your app contains exposed Google Cloud Platform (GCP) API keys. If i restrict API key with release SHA1 and package name then API key not working and gave response

{"errorMessage":"This IP, site or mobile application is not authorized to use this API key. Request received from IP address 39.57.167.49, with empty referer","status":"REQUEST_DENIED"}.

Please suggest what should i use to avoid google console warning.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
CodeX
  • 81
  • 1
  • 2
  • 6
  • I think you either need to encrypt the key or put it on your server maybe? (i am not familiar with the api and the guidelines) – JoSSte Oct 28 '19 at 10:57
  • how to encrypt? can u explain? – CodeX Oct 29 '19 at 05:39
  • choose an algorithm, encrypt the key in your package, and decrypt it when you use it in your code – JoSSte Oct 29 '19 at 19:41
  • @AtifAhmed_26 The TimeZone API is a web service. Please check out my answers in related threads: https://stackoverflow.com/a/57229885/11742502 and https://stackoverflow.com/a/57383084/11742502 – evan Oct 30 '19 at 09:10

0 Answers0