Authentication

Authentication

There are two ways to authenticate requests to v5.

In URL

import requests

API_KEY = # YOUR API KEY

pdl_url = "https://api.peopledatalabs.com/v5/person/enrich?api_key={}".format(API_KEY)

json_response = requests.get(pdl_url).json()
curl -X GET \
  'https://api.peopledatalabs.com/v5/person/enrich?api_key=xxxx'

In Header

import requests

API_KEY = # YOUR API KEY

pdl_url = "https://api.peopledatalabs.com/v5/person/enrich"

headers = {
    "X-Api-Key": API_KEY
}

json_response = requests.get(pdl_url,  headers=headers).json()
curl -X GET \
  'https://api.peopledatalabs.com/v5/person/enrich' \ 
  -H 'X-Api-Key: xxxx'

Requests made with an invalid API Key will return a 401 error. If you need any assistance here, would like to request a new API key, or delete your existing key, please contact your account manager or reach out to us at [email protected]


Did this page help you?