我正在使用createsend库来尝试建立与我的活动监视器帐户的连接。我想数数和监控发送给所有用户的电子邮件。但是,在尝试使用分配给我登录的用户的api密钥时,我会得到一个错误。
!pip install createsend
from createsend import *cs = CreateSend({'api_key': 'my_api_key'})
clients = cs.clients()错误:
Unauthorized: The CreateSend API responded with the following error - 50:
Must supply a valid HTTP Basic Authorization header这个api密钥是否需要是我发送给的每个特定用户的密钥,而不是作为我要登录的用户的密钥?如果是这样的话,我如何自动使用我的登录api密钥来获取所有users...to所需的所有密钥,然后得到监控邮件发送的最终产品?
使用的文件:
https://github.com/campaignmonitor/createsend-python
https://help.createsend.com/admin/api-keys
https://github.com/campaignmonitor/createsend-python/blob/master/lib/createsend/transactional.py
发布于 2022-06-02 15:47:06
您必须提供您的客户ID:
client = Client(auth,ClientID) # auth will be your api key
auth = {'api_key': 'my_api_key'}https://stackoverflow.com/questions/68120851
复制相似问题