【发布时间】:2017-03-07 00:59:53
【问题描述】:
我正在尝试从 Yelp API 获取访问令牌,并已阅读开发人员页面的说明以及请求文档,当我尝试发出请求时,它返回 {"error": {"code": "VALIDATION_ERROR", "description": "/oauth2/token/"}}我查找错误Yelp 开发者页面上的代码,但没有找到此错误代码。
import json
from pip._vendor import requests
clientID= 'my id as a string'
clientSecret ='my secret as a string'
par = {'grant_type' : 'client_credentials', 'client_id':clientID,'client_secret':clientSecret}
content = requests.post('https://api.yelp.com/oauth2/token/',params=par)
print(content.text)
有人可以帮我看看有什么问题吗?提前致谢。
【问题讨论】: