连接到 Revolut 沙箱 [英] Connecting to Revolut sandbox
问题描述
我正在尝试创建到 Revolut 的客户端连接.我正在关注他们的教程,但是我被困在交换授权码.
I'm trying to create a client connection to Revolut. I'm following their tutorial, however im'm stuck at Exchange Authorisation Code.
到目前为止我做了什么:
What i have done so far:
- 在他们的 sanbox 上创建了企业帐户
- 在此处添加了我的公钥 https://sandbox-business.revolut.com/settings/api
- 通过启用对您帐户的 API 访问激活了我的 API 证书(我完成了所有步骤并获得了现在已启用访问的信息),但是我仍然可以看到
访问未启用
在我的 API 证书上 - 创建了 JWT 令牌并使用我的私钥对其进行了签名(使用 https://jwt.io/ 对其进行了验证))
像这样发送访问令牌请求(通过邮递员完成):
- Created business account on their sanbox
- Added my public key here https://sandbox-business.revolut.com/settings/api
- Activated my API Certificate via Enable API access to your account(i went through all the steps and got information that access is now enabled), however i can still see
Access is not enabled
on my API certificate - created JWT token and signed it with my private key (verified it with https://jwt.io/)
send request for access token like this (done via postman):
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 证书的激活似乎很顺利,但后来我看到它没有被激活.您能否验证我的步骤以帮助我确定问题出在哪里?
Now im not sure it there is something im doing wrong with requesting access token or is it due to step 3, where it seems that activation of my API Certificates went fine but then i see it as not activated. Could you verify my steps to help me determine where the issue is?
推荐答案
原来授权码只有 2 分钟有效,之后你必须再申请一个.
Turns out Authorisation Code is valid 2 min only, after that time you have to request another one.
这篇关于连接到 Revolut 沙箱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!