我正在尝试创建与 Revolut 的客户端连接。我正在关注他们的tutorial https://revolutdev.github.io/business-api/#getting-started,但是我被困在兑换授权码.
到目前为止我所做的:
- 在他们的网站上创建了企业帐户sanbox https://sandbox-business.revolut.com/
- 在这里添加我的公钥https://sandbox-business.revolut.com/settings/api https://sandbox-business.revolut.com/settings/api
- 通过激活我的 API 证书启用对您帐户的 API 访问(我完成了所有步骤并获得了现在已启用访问的信息),但是我仍然可以看到
Access is not enabled
在我的 API 证书上
- 创建 JWT 令牌并使用我的私钥对其进行签名(使用https://jwt.io/ https://jwt.io/)
-
像这样发送访问令牌请求(通过邮递员完成):
curl --request POST \
--url https://sandbox-b2b.revolut.com/api/1.0/auth/token \
--header 'Accept: */*' \
--header 'Accept-Encoding: gzip, deflate' \
--header 'Cache-Control: no-cache' \
--header 'Connection: keep-alive' \
--header 'Content-Length: 596' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Host: sandbox-b2b.revolut.com' \
--header 'User-Agent: PostmanRuntime/7.20.1' \
--header 'cache-control: no-cache' \
--data 'grant_type=authorization_code&code;=oa_sand_xxx&client;_id=xxx&client;_assertion_type=xxx&client;_assertion=xxx
然而回应是:
{
"error": "unauthorized_client",
"error_description": "Incorrect request token"
}
现在我不确定我在请求访问令牌时做错了什么,还是由于步骤 3 造成的,其中我的 API 证书的激活似乎很顺利,但后来我发现它没有激活。您能否验证我的步骤以帮助我确定问题出在哪里?
结果授权码仅有效 2 分钟,之后您必须请求另一个授权码。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)