sg.client.contactdb.recipients.post(request_body=data) is throwing 403 error
I checked the new API endpoints and saw no change
Also tried using requests
import requests
import json
endpoint = "https://api.sendgrid.com/v3/contactdb/recipients"
data = [{"email": '[email protected]'}]
headers = {"Authorization":"Bearer APIKEY"}
print requests.post(endpoint,data=json.dumps(data),headers=headers).json()
Hello @inputjoker,
I just tested this endpoint with my API Key and I can not reproduce the 403 error.
This likely means there is an issue with your API key. Could you please contact https://support.sendgrid.com?
Thanks!
It is working with newly generated api keys.
Old keys were working only for sending mail.
Thanks for the follow up!
Most helpful comment
It is working with newly generated api keys.
Old keys were working only for sending mail.