【问题标题】:hipchat oauth token internal server errorhipchat oauth 令牌内部服务器错误
【发布时间】:2017-06-15 11:46:47
【问题描述】:

我关注 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 内部服务器错误。我的代码有什么问题?

【问题讨论】:

    标签: oauth token hipchat


    【解决方案1】:

    错误是我使用了 v1 令牌。

    当我切换到 v2 时效果很好

    【讨论】:

      猜你喜欢
      • 2021-03-23
      • 2019-12-30
      • 2020-01-05
      • 1970-01-01
      • 1970-01-01
      • 2020-07-25
      • 2019-07-16
      • 2012-06-20
      • 2012-04-18
      相关资源
      最近更新 更多