Invalid Credentials on Here Rest API
up vote
0
down vote
favorite
I have started to move some mapping functionality from Google to Here and have been successful on converting to displaying maps via Javascript. When I'm calling the geocoding API via rest within PHP, I'm receiving the following error:
invalid credentials for xxxxxxxxxxxxxxxxx
My PHP Test code is very simple and is using the same App Id and App Code as I'm using for javascript maps. With or without domain restriction enabled I receive the same credentials error. Same if the URL is entered in a browser using the correct Id & Code with the domain restriction off. Any idea on what to consider?
Here's the PHP test code with my id and code replaced with x's & y's:
$service_url = 'https://geocoder.api.here.com/6.2/geocode.xml?app_id=xxxxxxxxx&app_code=yyyyyyyyy&searchtext=Brooklyn%20NY';
$curl = curl_init($service_url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$curl_response = curl_exec($curl);
curl_close($curl);
echo $curl_response;
Thanks!!
here-api
add a comment |
up vote
0
down vote
favorite
I have started to move some mapping functionality from Google to Here and have been successful on converting to displaying maps via Javascript. When I'm calling the geocoding API via rest within PHP, I'm receiving the following error:
invalid credentials for xxxxxxxxxxxxxxxxx
My PHP Test code is very simple and is using the same App Id and App Code as I'm using for javascript maps. With or without domain restriction enabled I receive the same credentials error. Same if the URL is entered in a browser using the correct Id & Code with the domain restriction off. Any idea on what to consider?
Here's the PHP test code with my id and code replaced with x's & y's:
$service_url = 'https://geocoder.api.here.com/6.2/geocode.xml?app_id=xxxxxxxxx&app_code=yyyyyyyyy&searchtext=Brooklyn%20NY';
$curl = curl_init($service_url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$curl_response = curl_exec($curl);
curl_close($curl);
echo $curl_response;
Thanks!!
here-api
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have started to move some mapping functionality from Google to Here and have been successful on converting to displaying maps via Javascript. When I'm calling the geocoding API via rest within PHP, I'm receiving the following error:
invalid credentials for xxxxxxxxxxxxxxxxx
My PHP Test code is very simple and is using the same App Id and App Code as I'm using for javascript maps. With or without domain restriction enabled I receive the same credentials error. Same if the URL is entered in a browser using the correct Id & Code with the domain restriction off. Any idea on what to consider?
Here's the PHP test code with my id and code replaced with x's & y's:
$service_url = 'https://geocoder.api.here.com/6.2/geocode.xml?app_id=xxxxxxxxx&app_code=yyyyyyyyy&searchtext=Brooklyn%20NY';
$curl = curl_init($service_url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$curl_response = curl_exec($curl);
curl_close($curl);
echo $curl_response;
Thanks!!
here-api
I have started to move some mapping functionality from Google to Here and have been successful on converting to displaying maps via Javascript. When I'm calling the geocoding API via rest within PHP, I'm receiving the following error:
invalid credentials for xxxxxxxxxxxxxxxxx
My PHP Test code is very simple and is using the same App Id and App Code as I'm using for javascript maps. With or without domain restriction enabled I receive the same credentials error. Same if the URL is entered in a browser using the correct Id & Code with the domain restriction off. Any idea on what to consider?
Here's the PHP test code with my id and code replaced with x's & y's:
$service_url = 'https://geocoder.api.here.com/6.2/geocode.xml?app_id=xxxxxxxxx&app_code=yyyyyyyyy&searchtext=Brooklyn%20NY';
$curl = curl_init($service_url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$curl_response = curl_exec($curl);
curl_close($curl);
echo $curl_response;
Thanks!!
here-api
here-api
edited Nov 12 at 2:13
asked Nov 11 at 13:04
David Levine
12
12
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
Please check a similar post Convert terminal cURL command to PHP cURL request on settings parameters in PHP curl request. If your app_id and code doesn't work then try with the demo app id to check if the problem is related to your credentials and not the php code. Also, make sure you have copied your credentials correctly in the url. If issue still issued with your credentials, try creating another project in developer site and check if your new credentials is working.
I tried the dev info and it still fails but the dev info fails with a simple copy/paste from the Here site. As an example, if I try and run the Curl command copy/pasted from developer.here.com/api-explorer/rest/geocoder (no code, just curl), I get the same validation error. curl -X GET -H 'Content-Type: *' --get 'geocoder.api.here.com/6.2/geocode.json' --data-urlencode 'searchtext=200 S Mathilda Sunnyvale CA' --data-urlencode 'app_id=devportal-demo-20180625' --data-urlencode 'app_code=9v2BkviRwi9Ot26kp2IysQ' --data-urlencode 'gen=9'
– David Levine
Nov 12 at 14:52
So it makes it hard to troubleshoot when copy/paste of example code produces the same error.
– David Levine
Nov 12 at 14:54
1
In my case, if I throw the curl command from the example I also get a PermissionError, however it works if I replace app_id / app_code with the ones under the freemium plan I have in my developer account
– Michael P. Bazos
Nov 12 at 23:43
Thanks Michael. I get a permission error when I run the curl with the demo or with my own codes. Because I know the App Id and App Code work fine with all my javascript code, I wonder if there's some permission configuration at Here that is preventing the Curl from running?
– David Levine
Nov 13 at 12:21
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Please check a similar post Convert terminal cURL command to PHP cURL request on settings parameters in PHP curl request. If your app_id and code doesn't work then try with the demo app id to check if the problem is related to your credentials and not the php code. Also, make sure you have copied your credentials correctly in the url. If issue still issued with your credentials, try creating another project in developer site and check if your new credentials is working.
I tried the dev info and it still fails but the dev info fails with a simple copy/paste from the Here site. As an example, if I try and run the Curl command copy/pasted from developer.here.com/api-explorer/rest/geocoder (no code, just curl), I get the same validation error. curl -X GET -H 'Content-Type: *' --get 'geocoder.api.here.com/6.2/geocode.json' --data-urlencode 'searchtext=200 S Mathilda Sunnyvale CA' --data-urlencode 'app_id=devportal-demo-20180625' --data-urlencode 'app_code=9v2BkviRwi9Ot26kp2IysQ' --data-urlencode 'gen=9'
– David Levine
Nov 12 at 14:52
So it makes it hard to troubleshoot when copy/paste of example code produces the same error.
– David Levine
Nov 12 at 14:54
1
In my case, if I throw the curl command from the example I also get a PermissionError, however it works if I replace app_id / app_code with the ones under the freemium plan I have in my developer account
– Michael P. Bazos
Nov 12 at 23:43
Thanks Michael. I get a permission error when I run the curl with the demo or with my own codes. Because I know the App Id and App Code work fine with all my javascript code, I wonder if there's some permission configuration at Here that is preventing the Curl from running?
– David Levine
Nov 13 at 12:21
add a comment |
up vote
0
down vote
Please check a similar post Convert terminal cURL command to PHP cURL request on settings parameters in PHP curl request. If your app_id and code doesn't work then try with the demo app id to check if the problem is related to your credentials and not the php code. Also, make sure you have copied your credentials correctly in the url. If issue still issued with your credentials, try creating another project in developer site and check if your new credentials is working.
I tried the dev info and it still fails but the dev info fails with a simple copy/paste from the Here site. As an example, if I try and run the Curl command copy/pasted from developer.here.com/api-explorer/rest/geocoder (no code, just curl), I get the same validation error. curl -X GET -H 'Content-Type: *' --get 'geocoder.api.here.com/6.2/geocode.json' --data-urlencode 'searchtext=200 S Mathilda Sunnyvale CA' --data-urlencode 'app_id=devportal-demo-20180625' --data-urlencode 'app_code=9v2BkviRwi9Ot26kp2IysQ' --data-urlencode 'gen=9'
– David Levine
Nov 12 at 14:52
So it makes it hard to troubleshoot when copy/paste of example code produces the same error.
– David Levine
Nov 12 at 14:54
1
In my case, if I throw the curl command from the example I also get a PermissionError, however it works if I replace app_id / app_code with the ones under the freemium plan I have in my developer account
– Michael P. Bazos
Nov 12 at 23:43
Thanks Michael. I get a permission error when I run the curl with the demo or with my own codes. Because I know the App Id and App Code work fine with all my javascript code, I wonder if there's some permission configuration at Here that is preventing the Curl from running?
– David Levine
Nov 13 at 12:21
add a comment |
up vote
0
down vote
up vote
0
down vote
Please check a similar post Convert terminal cURL command to PHP cURL request on settings parameters in PHP curl request. If your app_id and code doesn't work then try with the demo app id to check if the problem is related to your credentials and not the php code. Also, make sure you have copied your credentials correctly in the url. If issue still issued with your credentials, try creating another project in developer site and check if your new credentials is working.
Please check a similar post Convert terminal cURL command to PHP cURL request on settings parameters in PHP curl request. If your app_id and code doesn't work then try with the demo app id to check if the problem is related to your credentials and not the php code. Also, make sure you have copied your credentials correctly in the url. If issue still issued with your credentials, try creating another project in developer site and check if your new credentials is working.
answered Nov 12 at 13:12
HERE Developer Support
931169
931169
I tried the dev info and it still fails but the dev info fails with a simple copy/paste from the Here site. As an example, if I try and run the Curl command copy/pasted from developer.here.com/api-explorer/rest/geocoder (no code, just curl), I get the same validation error. curl -X GET -H 'Content-Type: *' --get 'geocoder.api.here.com/6.2/geocode.json' --data-urlencode 'searchtext=200 S Mathilda Sunnyvale CA' --data-urlencode 'app_id=devportal-demo-20180625' --data-urlencode 'app_code=9v2BkviRwi9Ot26kp2IysQ' --data-urlencode 'gen=9'
– David Levine
Nov 12 at 14:52
So it makes it hard to troubleshoot when copy/paste of example code produces the same error.
– David Levine
Nov 12 at 14:54
1
In my case, if I throw the curl command from the example I also get a PermissionError, however it works if I replace app_id / app_code with the ones under the freemium plan I have in my developer account
– Michael P. Bazos
Nov 12 at 23:43
Thanks Michael. I get a permission error when I run the curl with the demo or with my own codes. Because I know the App Id and App Code work fine with all my javascript code, I wonder if there's some permission configuration at Here that is preventing the Curl from running?
– David Levine
Nov 13 at 12:21
add a comment |
I tried the dev info and it still fails but the dev info fails with a simple copy/paste from the Here site. As an example, if I try and run the Curl command copy/pasted from developer.here.com/api-explorer/rest/geocoder (no code, just curl), I get the same validation error. curl -X GET -H 'Content-Type: *' --get 'geocoder.api.here.com/6.2/geocode.json' --data-urlencode 'searchtext=200 S Mathilda Sunnyvale CA' --data-urlencode 'app_id=devportal-demo-20180625' --data-urlencode 'app_code=9v2BkviRwi9Ot26kp2IysQ' --data-urlencode 'gen=9'
– David Levine
Nov 12 at 14:52
So it makes it hard to troubleshoot when copy/paste of example code produces the same error.
– David Levine
Nov 12 at 14:54
1
In my case, if I throw the curl command from the example I also get a PermissionError, however it works if I replace app_id / app_code with the ones under the freemium plan I have in my developer account
– Michael P. Bazos
Nov 12 at 23:43
Thanks Michael. I get a permission error when I run the curl with the demo or with my own codes. Because I know the App Id and App Code work fine with all my javascript code, I wonder if there's some permission configuration at Here that is preventing the Curl from running?
– David Levine
Nov 13 at 12:21
I tried the dev info and it still fails but the dev info fails with a simple copy/paste from the Here site. As an example, if I try and run the Curl command copy/pasted from developer.here.com/api-explorer/rest/geocoder (no code, just curl), I get the same validation error. curl -X GET -H 'Content-Type: *' --get 'geocoder.api.here.com/6.2/geocode.json' --data-urlencode 'searchtext=200 S Mathilda Sunnyvale CA' --data-urlencode 'app_id=devportal-demo-20180625' --data-urlencode 'app_code=9v2BkviRwi9Ot26kp2IysQ' --data-urlencode 'gen=9'
– David Levine
Nov 12 at 14:52
I tried the dev info and it still fails but the dev info fails with a simple copy/paste from the Here site. As an example, if I try and run the Curl command copy/pasted from developer.here.com/api-explorer/rest/geocoder (no code, just curl), I get the same validation error. curl -X GET -H 'Content-Type: *' --get 'geocoder.api.here.com/6.2/geocode.json' --data-urlencode 'searchtext=200 S Mathilda Sunnyvale CA' --data-urlencode 'app_id=devportal-demo-20180625' --data-urlencode 'app_code=9v2BkviRwi9Ot26kp2IysQ' --data-urlencode 'gen=9'
– David Levine
Nov 12 at 14:52
So it makes it hard to troubleshoot when copy/paste of example code produces the same error.
– David Levine
Nov 12 at 14:54
So it makes it hard to troubleshoot when copy/paste of example code produces the same error.
– David Levine
Nov 12 at 14:54
1
1
In my case, if I throw the curl command from the example I also get a PermissionError, however it works if I replace app_id / app_code with the ones under the freemium plan I have in my developer account
– Michael P. Bazos
Nov 12 at 23:43
In my case, if I throw the curl command from the example I also get a PermissionError, however it works if I replace app_id / app_code with the ones under the freemium plan I have in my developer account
– Michael P. Bazos
Nov 12 at 23:43
Thanks Michael. I get a permission error when I run the curl with the demo or with my own codes. Because I know the App Id and App Code work fine with all my javascript code, I wonder if there's some permission configuration at Here that is preventing the Curl from running?
– David Levine
Nov 13 at 12:21
Thanks Michael. I get a permission error when I run the curl with the demo or with my own codes. Because I know the App Id and App Code work fine with all my javascript code, I wonder if there's some permission configuration at Here that is preventing the Curl from running?
– David Levine
Nov 13 at 12:21
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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%2f53249012%2finvalid-credentials-on-here-rest-api%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