Jump to content

Ahmad E.

Members
  • Posts

    1,065
  • Joined

 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 Ahmad E.

  1. Just now, Sly_Ripper said:

    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.

    After adding the nginx rule and restarting nginx, just reload the REST API page in the ACP, it should go through automatically and let you add an key.

  2. 15 hours ago, Sly_Ripper said:

    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"                                                                                      
    }                                                                                                                     

    I have the same nginx rule and it is working fine for me. You need to use

    curl --user APIKEY http://domain.com/api/core/hello
×
×
  • Create New...