MODX3: REST API - How to use API Key security with header "Authorization"?


how is it possible to do security via API KEY and header authorization for REST API?

Is there same preparations?

Thank you in advance.


To secure your REST API, you have to override the verifyAuthentication function in your controller.

public function verifyAuthentication()

Alternatively you can also extends the class modRestService and override the checkPermissions function.