Select Your Fluz Account
A single user might have access to multiple Fluz accounts (e.g., CONSUMER, BUSINESS). You need to specify which account your API calls will act upon.
-
Quick check using cURL (Sandbox):
Replace<YOUR_SANDBOX_API_KEY>
and<YOUR_SANDBOX_USER_ID>
with the Test credentials you retrieved earlier.curl -X POST https://transactional-graph.staging.fluzapp.com/api/v1/graphql \ -H "Authorization: Basic <YOUR_SANDBOX_API_KEY>" \ -H "Content-Type: application/json" \ -d '{ "query": "query getAccountsByUserId($userId: UUID!) { getAccountsByUserId(userId: $userId) { accountId type accountName } }", "variables": { "userId": "<YOUR_SANDBOX_USER_ID>" } }'
-
Response: Look for the
accountId
associated with the account you want to use.{ "data": { "getAccountsByUserId": [ { "accountId": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", // <-- Copy this ID "type": "BUSINESS", "accountName": "Your Name" } // ... potentially other accounts ] } }
-
💾 Save the
accountId
for the account you want to use. You will need this for the next steps. -
In your code: You can fetch accounts directly within your Node.js application.
- 📘 Code example:
Updated 17 days ago