Authentication

You'll need to authenticate your requests to access any of the endpoints in the datamagnet API. In this guide, we'll look at how authentication works. Datamagnet uses bearer tokens to authenticate your API requests.

Authentication with bearer token

The recommended way to authenticate with the datamagnet API is by using OAuth2. When establishing a connection using OAuth2, you will need your access token — you will find it in the Datamagnet's dashboard » API Keys. Here's how to add the token to the request header using cURL:

Example request with bearer token

curl https://api.datamagnet.co/api/v1/person \
  -H "Authorization: Bearer {token}"

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