如何授权带有承载令牌的获取请求?

时间:2020-06-28 17:50:44

标签: api https request postman

我正在尝试使用Transferwise api。

获取https://api.sandbox.transferwise.tech/v1/rates 我的令牌是efdc55d1-3e58-4223-8d8e-402fe189a88d

我一遍又一遍地收到此错误消息:

{
  "error": "invalid_token",
  "error_description": "baf58c02-e7ca-45b2-950a-44d6a39f851e"
}

我使用失眠和邮递员。 我如何从该链接获取信息?抱歉,我今天开始使用api,也许我的问题很糟糕。

1 个答案:

答案 0 :(得分:0)

在Postman中,您可以添加请求标头:

Authorization: Bearer <Your token>

https://learning.postman.com/docs/postman/sending-api-requests/requests/#configuring-request-headers

或使用请求构建器中的Auth标签,然后选择Bearer Token帮助程序,该帮助程序将为您添加请求标题。

https://learning.postman.com/docs/postman/sending-api-requests/authorization/#bearer-token