Google Place API not working for Android Key -


i using google autocomplete place api.

https://maps.googleapis.com/maps/api/place/autocomplete/json?key="my android key"&input=mg%20ro&components=country:in

the key generated console android-key

the api enabled in google api console

google places api web service google places api android google maps android api 

and sha-1 finger print of debug-keystore. on hitting, i'm getting output link is

{"error_message":"this ip, site or mobile application not authorized use api key. request received ip address 122.177.199.201, empty referer","predictions":[],"status":"request_denied"} 

while in case of server-key i'm getting proper response

{"predictions":[{"description":"mg road metro station","id":"9db78081a8f0e59874d51baff0df2c007e8c8dde","matched_substrings":[{"length":2,"offset":0}],"place_id":"chijy8g_aiizdtkrohs7ekrepsw","reference":"cjqkaaaaj-nav4s-wwdqfmk7d5v_uc6xt8s5wzzsknlqmha7ucgrd_agu5uioxvwlxtpjaaiehdoj61rtkbd9lk28seovch6ghspoma7wpxs6v8aprf_q03ttnzzrq","terms":[{"offset":0,"value":"mg road metro station"}],"types":["transit_station","point_of_interest","establishment","geocode"]},{"description":"m g road metro station, mehrauli-gurgaon road, sector 28, gurgaon, haryana, india","id":"041408b314da313beac2e2016c697a9aba451be8","matched_substrings":[{"length":22,"offset":0}],"place_id":"chijath6eiizdtkr-aeggpmadru","reference":"cmrgaaaaemjljnkgwpsnn5bme7_iu_uteaxrt83t2iuhgkja7pouwuxh6j6gvzplwisi-ypgyh1veus_wilmme2qbskobacpdtqmpdjq5q-bllxl3d81uovad8-jtvgrkollf_dpehcrduibxj90dqmy7iojsqxnghsfulvbf754fuwf2lfwzwtvlxmvoq","terms":[{"offset":0,"value":"m g road metro station"},{"offset":24,"value":"mehrauli-gurgaon road"},{"offset":47,"value":"sector 28"},{"offset":58,"value":"gurgaon"},{"offset":67,"value":"haryana"},{"offset":76,"value":"india"}],"types":["transit_station","point_of_interest","establishment","geocode"]},{"description":"mgf mall management, dlf city mall parking road, sector 28, gurgaon, haryana, india","id":"c8e8961eb24684f8fa6457876e0f5c1d7c38b5b9","matched_substrings":[{"length":2,"offset":0}],"place_id":"chijs3fmbyizdtkrkexzrn-6sbg","reference":"cnrhaaaapkaok6e148xwbkjzghnxnttdqstbf3vu5b0udthzc0jcdbtjceqwxcq-i8u_x838gyjhtllcnnswfrtu3jyvgna-evtnfhn1prknugpvoatonl2aeymxghqadw3by8uzf-erjosrbiceb2hfdokzphiqvurfqqxv67coiawqlvqxuxoubccsck3csfvr1ha0h2hzoiqemu8","terms":[{"offset":0,"value":"mgf mall management"},{"offset":21,"value":"dlf city mall parking road"},{"offset":49,"value":"sector 28"},{"offset":60,"value":"gurgaon"},{"offset":69,"value":"haryana"},{"offset":78,"value":"india"}],"types":["establishment"]},{"description":"mgf infratech, gurgaon, haryana, india","id":"1b4b1ce2e29a7a8f3b3d07192bf06f7e6f0df84f","matched_substrings":[{"length":2,"offset":0}],"place_id":"chijtytq6hgzdtkr2p2nzyt9tfa","reference":"ckq1aaaagasxqmineun1dighpf5khdroggpvichj5vlegmg-sykf3ordofu5jb9dp5lpry5byp9laix3alsdz0k4d5qcrxiqxi5gmf1jaksfbaufpmlvcrouqmmrziuzemhdivxmbnegkflrmzg","terms":[{"offset":0,"value":"mgf infratech"},{"offset":15,"value":"gurgaon"},{"offset":24,"value":"haryana"},{"offset":33,"value":"india"}],"types":["establishment"]},{"description":"mg road, national highway 236, maruti housing colony, gurgaon, haryana, india","id":"20c271b151605328170192b769e72e3e9bee6056","matched_substrings":[{"length":2,"offset":0}],"place_id":"chijryoveyizdtkrcmm4_rro_oe","reference":"cmrcaaaateh471banmlfv-mdp2hosvxw0_xxmnfqemgxciuzxvjslvocoympc0vhoifd7ngb-2rs5cfplaomyupearu3kkef6wpbq170ge7zrnscq1pdx12evhkm4r7mrud2f_kzehbq6yvt7wzjgakdxholeeobghtuxqjl41xcsz2dzzkstmshsu7nzg","terms":[{"offset":0,"value":"mg road"},{"offset":9,"value":"national highway 236"},{"offset":31,"value":"maruti housing colony"},{"offset":54,"value":"gurgaon"},{"offset":63,"value":"haryana"},{"offset":72,"value":"india"}],"types":["transit_station","point_of_interest","establishment","geocode"]}],"status":"ok"} 

i'm unable understand scenario why place api not working android-key. please try explain me.

thanks

first, try change existing android key options or create new key without package name , fingerprint restriction. if work, have error in package name ( .debug suffix added automatically package name in debug build )

also make sure you've added android key in manifest


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -