-
Posts
177 -
Joined
-
Last visited
Content Type
Downloads
Release Notes
IPS4 Guides
IPS4 Developer Documentation
Invision Community Blog
Development Blog
Deprecation Tracker
Providers Directory
Forums
Events
Store
Gallery
Posts posted by Sly_Ripper
-
-
7 hours ago, prupdated said:
location /api/ { rewrite ^/api/(.*)$ /api/index.php; }
Seems to be working (adjust for your directory structure as needed).
I used the sample script here:
Which outputs as expected (replaced name and url):
php testapi.php { "communityName": "name", "communityUrl": "url", "ipsVersion": "4.1.6" }
Strange, I'm still getting "INVALID_API_KEY".
-
I just added:
location /forums/api { try_files $uri $uri/ /forums/api/index.php; }
Now it just seems the API is broken, the key is correctly passed to the script (even checked by echoing the $rawApiKey variable), it just throws an exception:
curl http://localhost/forums/api/core/hello --user test: { "errorCode": "3S290\/7", "errorMessage": "INVALID_API_KEY" } curl http://localhost/forums/api/core/hello { "errorCode": "2S290\/6", "errorMessage": "NO_API_KEY" }
REST API - For nginx?
in Classic self-hosted technical help
Posted
Still the same result, I don't have any proper API Keys yet since the admin panel doesn't let you add any until it works with the "test" key.