python 连接到Snapchat Marketing API的问题

ny6fqffe  于 5个月前  发布在  Python
关注(0)|答案(1)|浏览(42)

我试图连接到Snapchat Marketing API,但不断得到<Respone [401]>错误,我可以在我的Python代码中发现问题吗?

import requests

token = "abc" #token generated from Conversions API Tokens in Snapchat Business Account

authorization = f'Bearer {token}'

headers = {"Authorization": authorization}

r = requests.get ('https://adsapi.snapchat.com/v1/me', headers=headers)

print(r)

字符串

hof1towb

hof1towb1#

看起来你的参数“authorization”不正确。检查你的括号和引号。

相关问题