William Knighting
William Knighting

Reputation: 113

Python 2.7 Mailchimp3 401 status "API Key is missing"

I am currently trying to make a call using mailchimp3:

client.reports.email_activity.all(campaign_id = '#######', getall=True, fields = '######') 

When I call large amounts of email data I get the 401 status error. I am able to call smaller amounts with no error.

I tried increasing:

request.get(timeout=10000) 

Upvotes: 0

Views: 105

Answers (1)

William Knighting
William Knighting

Reputation: 113

Pulling large amounts of data in one call can cause this timeout error. Instead it is best to use the offset method.

client.reports.email_activity.all(campaign_id = '#####', offset = #, count = #, fields = '######')

With this you can loop through and make a bunch of smaller calls instead of one large call that causes the timeout issue.

Thanks to the support staff at chimp mail that helped me trouble shoot this issue.

Upvotes: 1

Related Questions