Sendgrid-python: Add contact to contactsdb is throwing 403

Created on 27 Jun 2016  路  4Comments  路  Source: sendgrid/sendgrid-python

sg.client.contactdb.recipients.post(request_body=data) is throwing 403 error

I checked the new API endpoints and saw no change

help wanted bug

Most helpful comment

It is working with newly generated api keys.
Old keys were working only for sending mail.

All 4 comments

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DougCal picture DougCal  路  3Comments

danielghurley picture danielghurley  路  4Comments

thinkingserious picture thinkingserious  路  5Comments

MadReal picture MadReal  路  4Comments

hanhaa picture hanhaa  路  4Comments