Authentication
Intro
There are two levels of authentication available when calling ResiFlex APIs: organization level auth and account user auth. Both involve getting a Kraken Token, and then using that for further calls to the ResiFlex API.
Organization access
Typically, this is used for:
- Creating new accounts
- Getting data for multiple accounts
- Making changes to multiple accounts
Prerequisites
- An organization set up in ResiFlex with the permissions for your required functionality
- Knowing your Organization Secret Key
Getting an organization Kraken Token
Call the obtainKrakenToken GraphQL API endpoint with the mutation:
mutation ObtainKrakenToken($input: ObtainJSONWebTokenInput!) {
obtainKrakenToken(input: $input) {
token
}
}
Setting the variables:
{
"input": {
"organizationSecretKey": "sk_live_your-org-secret-key"
}
}
This will return a response with the Kraken Token:
{
"data": {
"obtainKrakenToken": {
"token": "your-kraken-token"
}
}
}
The returned Kraken Token can now be used for further calls to the GraphQL API endpoints which accept an organisation token.
Account user access
Typically, this is used for:
- Getting data for a single account
- Making changes to a single account
Getting an account user Kraken Token
🚧 WIP: This section will be added soon.