honeypot logo

Authorization

In this guide, we’ll look at how authorization works. Honeypot API requires API keys to be passed. API Keys can be passed through the header or as a parameter while making the request — Header is the recommended way.

Header Authorization

With header authorization, you pass your API token as a X-API-KEY header. Here's how to authenticate using cURL:

Example request with basic auth

curl https://api.honeypot.is/v2/IsHoneypot \
  -H "X-API-KEY: {APIKEY}"

Form Parameter Authorization

If you wish, you may pass the API Key as a form parameter apiKey while making the request. This is not recommended. Here's how to add the token to the request header using cURL:

Example request with bearer token

curl https://api.honeypot.is/v2/IsHoneypot \
  -d "apiKey={APIKEY}"
  -d "address=0x0"

Always keep your API Key safe and reset it if you suspect it has been compromised.