如何解决如何从Trustpilot获取业务单位ID
我无法从API Trustpilot获取业务单位ID。 我尝试对授权使用其他方式,但是仍然会获得未授权。 https://developers.trustpilot.com/business-units-api#find-a-business-unit的文档没有帮助。 我也尝试过令牌,但是仍然存在相同的问题-未经授权。
有人可以告诉我我做错了什么吗?
我的Python代码:
import requests
apikey= xxxxx
URL = 'https://api.trustpilot.com/v1/business-units/find?name=b_name?apikey={0}'.format(apikey)
response = requests.request("get",URL)
response.reason
解决方法
我发现如果将apikey添加到标题中,它将起作用。 最后看起来像这样:
import requests
apikey= xxxxx
URL = 'https://api.trustpilot.com/v1/business-units/find?name=b_name'
payload = {'apikey': apikey}
response = requests.request("get",URL,headers= payload)
response.reason
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。