I am working on developing a plugin for a tool called Supportify. It is a REST API that is authenticated through a key and token added to the HTTP header of a HTTP request to their servers. Their API reference is here. I know you can add things to the header with wp-config.php but for a publicly released plugin this is not feasible. Is there any way to do this through a plugin?


PHP allows you to send header information using the header() command.

More specific to WordPress is the send_headers action hook.

Also: always remember that you have to send all your headers before any output is sent to the screen.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.