- edited description
verify_credentials does not work
Even if the correct user name and password is used, it will say that the credentials are wrong, thus leaving the user no choice but to cancel it and have an unauthorized response.
edit: none of the api that uses auth works.
Comments (6)
-
reporter -
Everything works properly here.
{"error":"unauthorized"}
It basically means that you passed the wrong combination or the API doesn't recognize your authorization method. If the API doesn't recognize your authorization method it will simply get null values and won't make the request.
We do support HTTP Basic Authentication, some other methods may not work like Digest Auth and OAuth 1.0 and 2.0.
-
reporter I am using Basic Auth and I tested it with an API tester and it comes with the same error as seen in this screenshot
Here is the CURL response between the one I am hosting and the official method
takamachinanohanoMacBookPro15:~ ashe$ curl -u chikorita157:<redacted> -I https://malapi.shioridiary.me/account/verify_credentials HTTP/1.1 401 Unauthorized Server: cloudflare-nginx Date: Wed, 15 Oct 2014 12:47:50 GMT Content-Type: application/json Connection: keep-alive Set-Cookie: __cfduid=d6490294b94449a38c8c230c2b12696731413377269901; expires=Mon, 23-Dec-2019 23:50:00 GMT; path=/; domain=.shioridiary.me; HttpOnly Cache-Control: private WWW-Authenticate: Basic realm="myanimelist.net" CF-RAY: 179c20a0ef100400-EWR
takamachinanohanoMacBookPro15:~ ashe$ curl -u chikorita157:<redacted> curl -I http://myanimelist.net/api/account/verify_credentials.xml curl: (6) Could not resolve host: curl HTTP/1.1 200 OK Content-Type: text/html Connection: close Cache-Control: no-cache Connection: close Content-Length: 5085 X-Iinfo: 9-28180923-0 0NNN RT(1413377212116 1) q(0 -1 -1 -1) r(0 -1) B10(4,289,0) U6 Set-Cookie: incap_ses_224_81958=aDWqZ2AcBEM1jlpbH88bA7xsPlQAAAAA/vCKQlKxEYcSRqc0frx5Ng==; path=/; Domain=.myanimelist.net Set-Cookie: visid_incap_81958=GYiLp97RRviPzaI0S+LpO7xsPlQAAAAAQUIPAAAAAAC1E2ui84iLnSfLb93eW9Kz; expires=Fri, 14 Oct 2016 12:39:38 GMT; path=/; Domain=.myanimelist.net
My server is running Ubuntu 12.04 on Apache using PHP5.4 FPM.
-
Just tested it using your host: it seems to be not working there. You should check your configurations, I am not sure whats wrong but the server keeps asking me for authorization when I just enter it in the browser. This isn't normal behavior.
Anyway the API works fine. I will check things to be 100% sure.
-
reporter Yep, it's was the configuration used for PHP5-fpm as I was trying to get it work back in 2012 so I don't have to use mod_php, but apparently that hackjob of a fix causes some problems for scripts although it worked fine with Wordpress.
After fixing that, it works. takamachinanohanoMacBookPro15:~ ashe$ curl -u chikorita157:<redacted> -I http://malapi.shioridiary.me/account/verify_credentials HTTP/1.1 200 OK Date: Wed, 15 Oct 2014 13:49:49 GMT Server: Apache Cache-Control: private Content-Type: application/json
-
- changed status to resolved
Good!
- Log in to comment