我关注hipchat站点并尝试获取附加令牌https://developer.atlassian.com/hipchat/guide/hipchat-rest-api/api-access-tokens?_ga=2.94621780.975509804.1497491262-871504840.1479901346#APIaccesstokens-Add-ongeneratedtokens
我有以下代码:
import requests
secret = 'hipchat_secret'
headers = {'Content-Type': 'application/x-www-form-urlencoded',
'Authorization': 'Basic {}'.format(secret)}
url = 'https://api.hipchat.com/v2/oauth/token?grant_type=client_credentials&scope=send_notification+admin_room'
res = requests.post(url, headers=headers)但它给出了一个500内部服务器错误。我的代码出了什么问题?
发布于 2017-07-21 09:29:12
错误是我使用了v1令牌。
当我切换到v2时,它工作得很完美
https://stackoverflow.com/questions/44566702
复制相似问题