ModernFi’s approach to authentication is designed to ensure the security and safety of user data and assets. Follow these steps to get up and running with the ModernFi API.
To get your Client ID and Client Secret, contactthe ModernFi team. When reaching out, let your representative know whether you need read-only or read+write access:
ModernFi will onboard your institution and share the corresponding credentials via SendSafely.
With your Client ID and Client Secret, make a request to the oauth2/token endpoint to receive an access_token.
The response is of the following shape:
To pass your user token to ModernFi APIs, add it as a header to your API calls in the following format:
If, for example, your API token were eyJraWQiOiI3Yll, your authorization header will be:
Here is an example API call that properly sets the authorization header:
Access tokens have a TTL of 86400 seconds (24 hours). We recommend caching your token and reusing it across API calls rather than requesting a new token on each request. When the token expires, simply request a new one using the same credentials.
If you need to revoke a token before it expires, contactyour ModernFi representative.