Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sqlite/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
hipchat oauth令牌内部服务器错误_Oauth_Token_Hipchat - Fatal编程技术网

hipchat oauth令牌内部服务器错误

hipchat oauth令牌内部服务器错误,oauth,token,hipchat,Oauth,Token,Hipchat,我关注hipchat站点并尝试获取附加令牌 我有以下代码: 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

我关注hipchat站点并尝试获取附加令牌

我有以下代码:

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的内部服务器错误。我的代码怎么了?

错误是我使用了v1令牌

当我切换到v2时,它工作得非常好