⌘I

API Authentication

Updated March 8, 2024 ·
apigoldplatinum
Also available in:

Available on: Professional, Business plans

Once you have your API keys you can use them to authenticate API requests. Formspree recognizes two authentication schemes, Basic and Bearer.

Basic Authentication

You can use basic auth by filling in the Authorization header as follows:

Authorization: Basic base64_encoded(username:password)

Formspree ignores the username, but expects the password to be either the master key or public API key for your form.

Here’s an example of using CURL with basic auth:

curl -u :API_KEY https://some.domain/

Bearer Token Authentication

You can put your key directly into the header by using the bearer authentication type. Just fill in the Authorization header as follows:

Authorization: Bearer YOUR_API_KEY

Here’s a CURL example:

curl http://some.domain/ -H "Authorization: Bearer YOUR_API_KEY"

Still have questions? or .