【问题标题】:Getting the error "Mandatory grant_type form parameter missing" in postman在邮递员中收到错误“Mandatory grant_type form parameter missing”
【发布时间】:2019-06-29 11:10:46
【问题描述】:

这是在邮递员上输入的信息 网址 - https://test.api.amadeus.com/v1/security/oauth2/token 参数: grant_type - client_credentials client_secret - {{My_API_Secret_key}} client_id - {{My_API_key}}

标题 内容类型:application/x-www-form-urlencoded

它返回这个响应: { “错误”:“无效请求”, "error_description": "缺少必需的 grant_type 表单参数", “代码”:38187, "title": "无效参数" }

【问题讨论】:

    标签: amadeus


    【解决方案1】:

    这是一个post 请求。所以你应该在不同的类型下传递这些parameters

    例如,在 python 的 requests 库中,它将位于您的 data 中:

    requests.post("{}/v1/security/oauth2/token".format(url), data=YOURPARAMETERS, headers=YOURHEADERS )
    

    【讨论】:

      猜你喜欢
      • 2022-12-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-10
      • 2019-02-10
      • 2020-07-29
      • 2021-05-04
      • 2022-11-28
      相关资源
      最近更新 更多