0
我跟着hipchat網站,並嘗試獲得一個附加令牌 https://developer.atlassian.com/hipchat/guide/hipchat-rest-api/api-access-tokens?_ga=2.94621780.975509804.1497491262-871504840.1479901346#APIaccesstokens-Add-ongeneratedtokenshipchat OAuth令牌內部服務器錯誤
我有以下代碼:
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內部服務器錯誤。我的代碼有什麼問題?