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!!










share|improve this question



























    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!!










    share|improve this question

























      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!!










      share|improve this question















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 12 at 2:13

























      asked Nov 11 at 13:04









      David Levine

      12




      12






















          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.






          share|improve this answer




















          • 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










          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',
          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
          );



          );













          draft saved

          draft discarded


















          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

























          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.






          share|improve this answer




















          • 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














          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.






          share|improve this answer




















          • 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












          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.






          share|improve this answer












          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.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          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
















          • 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

















          draft saved

          draft discarded
















































          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.




          draft saved


          draft discarded














          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





















































          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







          Popular posts from this blog

          Top Tejano songwriter Luis Silva dead of heart attack at 64

          政党

          天津地下鉄3号線