Mailjet:删除con

2024-06-16 12:17:18 发布

您现在位置:Python中文网/ 问答频道 /正文

是否有可能从mailjet中删除acontact?在

他们的contact API doc甚至没有将delete列为受支持的操作。在

from mailjet_rest import Client

mailjet = Client(auth=(MAILJET_API_KEY, MAILJET_API_SECRET), version='v3')
mailjet.contact.delete(<contact-id>).json()
{'ErrorInfo': '', 'ErrorMessage': 'Operation not allowed', 'StatusCode': 401}

我感兴趣的是删除contact,而不是list recipient,因此这个问题不是{a3}的重复。在


Tags: keyfromimportclientauthrestapisecret
2条回答

API reference似乎尚未使用DELETE方法更新,但在API guides下似乎有关于如何删除联系人的信息:

Retrieve a Contact

To delete a contact, you must first identify its presence in the contact database of your account.

Use GET /contact/$CONTACT_EMAIL to do it.

curl -s \
    -X GET \
     user "$MJ_APIKEY_PUBLIC:$MJ_APIKEY_PRIVATE" \
    https://api.mailjet.com/v3/REST/contact/$CONTACT_EMAIL 

Delete the Contact

Use the {contact_ID} you retrieved to DELETE the contact with the /v4/contacts/{contact_ID} endpoint. When the deletion is successful, the API will return a 200 OK status. Any other response will indicate that the deletion was not successfully processed.

^{pr2}$

随着被删除的权利和GDPR迫在眉睫,我也会对此感兴趣。他们的支持团队说这是不可能的,您必须联系他们,以便他们可以手动删除联系人?!在

相关问题 更多 >