25% off ProSNIPC25OFF

Require API Key for Custom REST Endpoint

Registers a protected GET endpoint at /wp-json/scseed/v1/protected-data that returns 401 unless the caller supplies a valid X-API-Key header.

PHPProby SnipCraft

This is a Pro snippet

The full code for “Require API Key for Custom REST Endpoint” is part of the SnipCraft Pro library. Get every Pro snippet and module, and import them in one click.

Get SnipCraft Pro

Questions about Pro? Contact us.

#api-key#authentication#rest-api#security