Getting an authorization token #2757
Replies: 3 comments 6 replies
-
The error indicates that you were trying to open |
Beta Was this translation helpful? Give feedback.
-
@rijkvanzanten I'm sorry about the difference in the script and the error. I was trying different solutions found on web and it seems my code was copied after changing the path back to original. To your question, yes, I am sure the full path is http://127.0.0.1/slotspanel (and not /api/), and I am also using a XAMPP Server (latest PHP 7) for development purposes on windows. Any suggestion will be appreciated. EDIT: Error log entry for each refresh I do on my script
|
Beta Was this translation helpful? Give feedback.
-
@rijkvanzanten never mind. I had to change my URL to http://127.0.0.1/slotspanel/slotspanel/auth/authenticate where the first /slotspanel is the directory and the second is the project name. Thank you for your time! |
Beta Was this translation helpful? Give feedback.
-
I am trying to get a token by sending my POST data (mail & pass) to the API but no luck so far.
My project's name is slotspanel, and my token request test script is below.
The response I get, instead of getting a JSON object, is...
Warning: file_get_contents(http://127.0.0.1/slotspanel/api/auth/authenticate): failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized in C:\xampp_new\htdocs\index2.php on line 18
Do I do anything wrong here?
Beta Was this translation helpful? Give feedback.
All reactions