There's two ways to use the demo app:
- Run it with no configuration, and enter your Client ID / Secret and Customer GUID every time you launch the app (see screenshot below), or
- Preconfigure the environment with your credentials and the customer you'd like to test with.
If you'd like to preconfigure the environment, be sure to have the following information handy for your bank:
- Client ID
- Client Secret
- Customer Guid to test with
The Cybrid Web Demo App authenticates to your Sandbox Bank, and connects under the context of a specific customer, which is why we'll provide it with a specific Customer GUID.
If you don't have these details handy, you can retrieve the Client ID from the Bank page in the Cybrid Partner Portal. Similarly, you can navigate to Customers, select your test customer, and click the copy icon beside their guid. Unfortunately if you've lost your Client Secret there is no way to retrieve it, so you'll need to navigate to the API Keys in the Partner Portal and click Generate New Key to obtain new credentials.
Next, we're going to be editing the following file in order to configure the web app:
Open up environment.ts and replace the empty clientId, clientSecret and customerGuid strings with your specific details.
Note: When entering your credential via the UI, you could use a Bearer Token instead of using Client ID and Secret. Use the below curl command, populated with your Client ID and Secret, to generate a bearer token with full scope credentials:
curl -X POST https://id.demo.cybrid.app/oauth/token \
"scope": "banks:read banks:write accounts:read accounts:execute customers:read customers:write customers:execute prices:read quotes:execute trades:execute trades:read"
-H "Content-Type: application/json"