We are trying to access the below-mentioned API in the sandbox environment.
It worked well in postman.
But when we tried from within our Ruby-On-Rails application (and also cURL), We are facing some issues in the oAuth authentication process (Authorization Code Flow).
The first step, getting the authorization code is working. We get the code and the state.
The issue is in the second step, which is getting the access token. Attached the details as cURL. We keep on getting {"error":"invalid_grant","error_description":"Code not valid"}. I made sure I exactly used the code I got the previous(authorize) call. Please help me in understanding if I missing something. Also would be great if you can send us sample cURL or ruby code for this authentication process.
curl \
--request POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data "code=2049cd47-9f98-427c-b399-6a9546600bdd.e91525ba-b63a-41af-8052-a93886d6a947.f:b04b9e0f-9d0d-4367-99ef-7d876dc8ff1d:cf7e45d5-4eb8-4268-9ebf-8fbd39e307c5&client_id=cf7e45d5-4eb8-4268-9ebf-8fbd39e307c5&client_secret=8dfxxxxx-xxx-xxxx-xxxx-xxxxxxxxxx1c&redirect_uri= http://vkn35.xyz.com/finastra_callback&grant_type=authorization_code" \
https://api.fusionfabric.cloud/login/v1/sandbox/oidc/token
I have masked the client_secret and the recirect_uri. But I ensured that I passed the right values.
API: Corporate Lending Risk Management (1.0.0)
Also, there are a few other questions we have.
1. Why cannot we access this Corporate Lending Risk Management (1.0.0) API in B2B channel? We want to directly consume it from withing our app without user need to enter Finastra password.
2. This API is still in Beta. When can this be ready for production use?
3. As mentioned above, do you have any sample application in the Ruby language or Rails framework? Even some detailed documentation with the API flow and the cURL codes (sample cUrl commands) also would be more helpful.