随着Flash的结束,传统文件类型将在2020年12月消失。为避免中断,请开始将文件过渡到下一代。 学到更多

API Calls stuck on valid Token

已回答
0

评论

3 条评论

  • Jeff Hickey

    Hi Nick, what does your code look like for requesting the bearer token? Please don't include your actual Client ID or Client Secret if you post your bearer token request code.

    0
  • Nick Ryberg
    host = 'api.app.wdesk.com'
    path = '/iam/v1/oauth2/token'
    bearer_headers = {
      'Content-Type': 'application/x-www-form-urlencoded',
      'charset': 'UTF-8'
    }
    bearer_url = 'https://' + host + path
    bearer_data = {'client_id':client_id, 'client_secret':secret, 'grant_type':'client_credentials'}
    bearer_result = requests.post(bearer_url, data= bearer_data, headers=bearer_headers)
    bearer_json = json.loads(x.text)
    bearer_token = bearer_json['access_token']
    0
  • Nick Ryberg

    Annnd....  realized I didn't carry the names through correctly.  It's working now. 

    0

请先登录再写评论。