This site is not authorized
Please help me!
I am creating find near by places application in android, when i request for places using Unrestricted key. It will response me fully.
But after restricting Key with my project name, Released SHA1
and Debug SHA1
it will not responding and give me error.
"This IP, site or mobile application is not authorized to use this API key.
Ask Question".
- I am requesting using HttpURLConnection,
My request code is
StringBuilder googlePlaceUrl = new StringBuilder
("https://maps.googleapis.com/maps/api/place/nearbysearch/json?
location=" + latitude + "," + longitude + "&rankby=distance&type="+
nearbyPlace +"&key=xxxxxxxxxxx");
In my manifest
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxxxx" />
I am not expecting this answer.
{ "error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address 103.24.99.82, with empty referer",
"routes" : , "status" : "REQUEST_DENIED"
}

add a comment |
Please help me!
I am creating find near by places application in android, when i request for places using Unrestricted key. It will response me fully.
But after restricting Key with my project name, Released SHA1
and Debug SHA1
it will not responding and give me error.
"This IP, site or mobile application is not authorized to use this API key.
Ask Question".
- I am requesting using HttpURLConnection,
My request code is
StringBuilder googlePlaceUrl = new StringBuilder
("https://maps.googleapis.com/maps/api/place/nearbysearch/json?
location=" + latitude + "," + longitude + "&rankby=distance&type="+
nearbyPlace +"&key=xxxxxxxxxxx");
In my manifest
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxxxx" />
I am not expecting this answer.
{ "error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address 103.24.99.82, with empty referer",
"routes" : , "status" : "REQUEST_DENIED"
}

So you are calling a Web API and configured your key to be Android only?. Shouldn't you be using the Places SDK for Android?
– Morrison Chang
Jan 2 at 5:21
4
Have you Checked stackoverflow.com/questions/21933247/… ?
– ADM
Jan 2 at 5:22
Please review the types of API keys in Using Google Maps API FAQ
– Morrison Chang
Jan 2 at 16:22
add a comment |
Please help me!
I am creating find near by places application in android, when i request for places using Unrestricted key. It will response me fully.
But after restricting Key with my project name, Released SHA1
and Debug SHA1
it will not responding and give me error.
"This IP, site or mobile application is not authorized to use this API key.
Ask Question".
- I am requesting using HttpURLConnection,
My request code is
StringBuilder googlePlaceUrl = new StringBuilder
("https://maps.googleapis.com/maps/api/place/nearbysearch/json?
location=" + latitude + "," + longitude + "&rankby=distance&type="+
nearbyPlace +"&key=xxxxxxxxxxx");
In my manifest
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxxxx" />
I am not expecting this answer.
{ "error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address 103.24.99.82, with empty referer",
"routes" : , "status" : "REQUEST_DENIED"
}

Please help me!
I am creating find near by places application in android, when i request for places using Unrestricted key. It will response me fully.
But after restricting Key with my project name, Released SHA1
and Debug SHA1
it will not responding and give me error.
"This IP, site or mobile application is not authorized to use this API key.
Ask Question".
- I am requesting using HttpURLConnection,
My request code is
StringBuilder googlePlaceUrl = new StringBuilder
("https://maps.googleapis.com/maps/api/place/nearbysearch/json?
location=" + latitude + "," + longitude + "&rankby=distance&type="+
nearbyPlace +"&key=xxxxxxxxxxx");
In my manifest
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="xxxxxxxxx" />
I am not expecting this answer.
{ "error_message" : "This IP, site or mobile application is not authorized to use this API key. Request received from IP address 103.24.99.82, with empty referer",
"routes" : , "status" : "REQUEST_DENIED"
}


edited Jan 2 at 5:34


Android
805420
805420
asked Jan 2 at 5:17


Siddiq AtharSiddiq Athar
82
82
So you are calling a Web API and configured your key to be Android only?. Shouldn't you be using the Places SDK for Android?
– Morrison Chang
Jan 2 at 5:21
4
Have you Checked stackoverflow.com/questions/21933247/… ?
– ADM
Jan 2 at 5:22
Please review the types of API keys in Using Google Maps API FAQ
– Morrison Chang
Jan 2 at 16:22
add a comment |
So you are calling a Web API and configured your key to be Android only?. Shouldn't you be using the Places SDK for Android?
– Morrison Chang
Jan 2 at 5:21
4
Have you Checked stackoverflow.com/questions/21933247/… ?
– ADM
Jan 2 at 5:22
Please review the types of API keys in Using Google Maps API FAQ
– Morrison Chang
Jan 2 at 16:22
So you are calling a Web API and configured your key to be Android only?. Shouldn't you be using the Places SDK for Android?
– Morrison Chang
Jan 2 at 5:21
So you are calling a Web API and configured your key to be Android only?. Shouldn't you be using the Places SDK for Android?
– Morrison Chang
Jan 2 at 5:21
4
4
Have you Checked stackoverflow.com/questions/21933247/… ?
– ADM
Jan 2 at 5:22
Have you Checked stackoverflow.com/questions/21933247/… ?
– ADM
Jan 2 at 5:22
Please review the types of API keys in Using Google Maps API FAQ
– Morrison Chang
Jan 2 at 16:22
Please review the types of API keys in Using Google Maps API FAQ
– Morrison Chang
Jan 2 at 16:22
add a comment |
1 Answer
1
active
oldest
votes
Go to Google API Console. Select your project and and click on the API Key you have created.
In that you will find Key Restriction. Please check restriction none. If you want to select Android then you need to add the package name
of the Application and the SHA1 key
. Make sure you entered the correct package name and SHA1 Key. If you have entered SHA1 key of your PC then it will not work in another pc if you are working in team. For that you need to add another SHA1 Key of that particular PC.
But i have to restrict my key, coz i want to publish this. Without restriction it works fine.
– Siddiq Athar
Jan 2 at 5:31
1
Then please check you have entered the correct SHA1 Key and package name. Please add SHA1 key of relese keystore and sign apk with that keystore
– Chirag
Jan 2 at 5:33
After creating keystore successfully using keytool -list -v -keystore mystore.keystore "MYPATH/file.jks" I am still getting same error :( Should i use Unrestricted key and upload it?
– Siddiq Athar
Jan 2 at 5:54
Google documentation is just saying to replaces the URL and key with your API KEY. I don't know what is difference between API key and Server Key.
– Siddiq Athar
Jan 3 at 4:44
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54001547%2fthis-site-is-not-authorized%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Go to Google API Console. Select your project and and click on the API Key you have created.
In that you will find Key Restriction. Please check restriction none. If you want to select Android then you need to add the package name
of the Application and the SHA1 key
. Make sure you entered the correct package name and SHA1 Key. If you have entered SHA1 key of your PC then it will not work in another pc if you are working in team. For that you need to add another SHA1 Key of that particular PC.
But i have to restrict my key, coz i want to publish this. Without restriction it works fine.
– Siddiq Athar
Jan 2 at 5:31
1
Then please check you have entered the correct SHA1 Key and package name. Please add SHA1 key of relese keystore and sign apk with that keystore
– Chirag
Jan 2 at 5:33
After creating keystore successfully using keytool -list -v -keystore mystore.keystore "MYPATH/file.jks" I am still getting same error :( Should i use Unrestricted key and upload it?
– Siddiq Athar
Jan 2 at 5:54
Google documentation is just saying to replaces the URL and key with your API KEY. I don't know what is difference between API key and Server Key.
– Siddiq Athar
Jan 3 at 4:44
add a comment |
Go to Google API Console. Select your project and and click on the API Key you have created.
In that you will find Key Restriction. Please check restriction none. If you want to select Android then you need to add the package name
of the Application and the SHA1 key
. Make sure you entered the correct package name and SHA1 Key. If you have entered SHA1 key of your PC then it will not work in another pc if you are working in team. For that you need to add another SHA1 Key of that particular PC.
But i have to restrict my key, coz i want to publish this. Without restriction it works fine.
– Siddiq Athar
Jan 2 at 5:31
1
Then please check you have entered the correct SHA1 Key and package name. Please add SHA1 key of relese keystore and sign apk with that keystore
– Chirag
Jan 2 at 5:33
After creating keystore successfully using keytool -list -v -keystore mystore.keystore "MYPATH/file.jks" I am still getting same error :( Should i use Unrestricted key and upload it?
– Siddiq Athar
Jan 2 at 5:54
Google documentation is just saying to replaces the URL and key with your API KEY. I don't know what is difference between API key and Server Key.
– Siddiq Athar
Jan 3 at 4:44
add a comment |
Go to Google API Console. Select your project and and click on the API Key you have created.
In that you will find Key Restriction. Please check restriction none. If you want to select Android then you need to add the package name
of the Application and the SHA1 key
. Make sure you entered the correct package name and SHA1 Key. If you have entered SHA1 key of your PC then it will not work in another pc if you are working in team. For that you need to add another SHA1 Key of that particular PC.
Go to Google API Console. Select your project and and click on the API Key you have created.
In that you will find Key Restriction. Please check restriction none. If you want to select Android then you need to add the package name
of the Application and the SHA1 key
. Make sure you entered the correct package name and SHA1 Key. If you have entered SHA1 key of your PC then it will not work in another pc if you are working in team. For that you need to add another SHA1 Key of that particular PC.
answered Jan 2 at 5:27
ChiragChirag
47.6k22138187
47.6k22138187
But i have to restrict my key, coz i want to publish this. Without restriction it works fine.
– Siddiq Athar
Jan 2 at 5:31
1
Then please check you have entered the correct SHA1 Key and package name. Please add SHA1 key of relese keystore and sign apk with that keystore
– Chirag
Jan 2 at 5:33
After creating keystore successfully using keytool -list -v -keystore mystore.keystore "MYPATH/file.jks" I am still getting same error :( Should i use Unrestricted key and upload it?
– Siddiq Athar
Jan 2 at 5:54
Google documentation is just saying to replaces the URL and key with your API KEY. I don't know what is difference between API key and Server Key.
– Siddiq Athar
Jan 3 at 4:44
add a comment |
But i have to restrict my key, coz i want to publish this. Without restriction it works fine.
– Siddiq Athar
Jan 2 at 5:31
1
Then please check you have entered the correct SHA1 Key and package name. Please add SHA1 key of relese keystore and sign apk with that keystore
– Chirag
Jan 2 at 5:33
After creating keystore successfully using keytool -list -v -keystore mystore.keystore "MYPATH/file.jks" I am still getting same error :( Should i use Unrestricted key and upload it?
– Siddiq Athar
Jan 2 at 5:54
Google documentation is just saying to replaces the URL and key with your API KEY. I don't know what is difference between API key and Server Key.
– Siddiq Athar
Jan 3 at 4:44
But i have to restrict my key, coz i want to publish this. Without restriction it works fine.
– Siddiq Athar
Jan 2 at 5:31
But i have to restrict my key, coz i want to publish this. Without restriction it works fine.
– Siddiq Athar
Jan 2 at 5:31
1
1
Then please check you have entered the correct SHA1 Key and package name. Please add SHA1 key of relese keystore and sign apk with that keystore
– Chirag
Jan 2 at 5:33
Then please check you have entered the correct SHA1 Key and package name. Please add SHA1 key of relese keystore and sign apk with that keystore
– Chirag
Jan 2 at 5:33
After creating keystore successfully using keytool -list -v -keystore mystore.keystore "MYPATH/file.jks" I am still getting same error :( Should i use Unrestricted key and upload it?
– Siddiq Athar
Jan 2 at 5:54
After creating keystore successfully using keytool -list -v -keystore mystore.keystore "MYPATH/file.jks" I am still getting same error :( Should i use Unrestricted key and upload it?
– Siddiq Athar
Jan 2 at 5:54
Google documentation is just saying to replaces the URL and key with your API KEY. I don't know what is difference between API key and Server Key.
– Siddiq Athar
Jan 3 at 4:44
Google documentation is just saying to replaces the URL and key with your API KEY. I don't know what is difference between API key and Server Key.
– Siddiq Athar
Jan 3 at 4:44
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54001547%2fthis-site-is-not-authorized%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
So you are calling a Web API and configured your key to be Android only?. Shouldn't you be using the Places SDK for Android?
– Morrison Chang
Jan 2 at 5:21
4
Have you Checked stackoverflow.com/questions/21933247/… ?
– ADM
Jan 2 at 5:22
Please review the types of API keys in Using Google Maps API FAQ
– Morrison Chang
Jan 2 at 16:22