You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I see the response of self.client.batch_operations.create() method and check the _links[1].href I get this URL [https://us18.api.mailchimp.com/3.0/batches/5cfa0d22b8] it says API key missing.
This is my operations object
Hi @aqua-regia i have lost 6 hours to found my error in the body of the batch operations in insert subscribes into lists, i used json.dumps(body)
def _get_data(e, to=None):
_data = {
"method": "POST", # The http verb for the operation
"path": "/lists/{}/members".format(res['id']), # The relative path of the operation
# "operation_id": "my-id", # A string you provide that identifies the operation
# "params": {
# "id": res['id']
# }, # Any URL params, only used for GET
"body": {
'status': 'subscribed',
'merge_fields': {},
} # The JSON payload for PUT, POST, or PATCH
}
_data['body']['email_address'] = e.email
_data['body']['merge_fields']['FNAME'] = e.nome.encode('utf-8')
if to == 'lote':
_data['body'] = json.dumps(_data['body'])
return _data
If I see the response of self.client.batch_operations.create() method and check the _links[1].href I get this URL [https://us18.api.mailchimp.com/3.0/batches/5cfa0d22b8] it says API key missing.
This is my operations object
And this is my reponse object
Whereas all my other operations like get all lists are working fine.
I even used MailChimp API 3.0, but that also showed me the same error.
If I create lists using below it works
Whereas the below gives the same error
And this is my batch_operation_endpoint
The text was updated successfully, but these errors were encountered: