Client Access Applications
The Client Apps API uses OIDC Connect to permit your users to link your application to their accounts.
Demo code is available at swan-bitcoin/integration-simulator on Github
Scopes​
The following scopes can be requested at authentication time:
Description | Scope |
---|---|
Required scopes (always include these) | openid , v1 |
Offline access (Learn More) | offline_access |
List wallets added by your app | read:vendor_wallet |
Add wallets from your app | write:vendor_wallet |
Read settings for automatic withdrawals | read:automatic_withdrawal |
Create and manage automatic withdrawals | write:automatic_withdrawal |
Read settings for savings plans | read:savings-plan |
Create and manage savings plans | write:savings-plan |
Read transaction information | read:transactions |
Query available payment methods | read:payment-method |
Create and manage payment methods | write:payment-method |
List LN withdrawals | read:withdrawal |
Create LN withdrawals | write:withdrawal |
Offline Access and token TTL​
Requesting offline access will return back a refresh token that can be used to receive a new access token.
This can be used for apps such as desktop wallets, which may need to periodically submit new addresses for withdrawal to Swan and require to be able to connect to Swan over a longer period of time.
TTL of access tokens are set to 1 hour.
Getting Access Keys for your Client App​
Integrations need to be whitelisted on our side. We provide a set of keys valid
for development (api.dev.swanbitcoin.com
) environment and for production
(api.swanbitcoin.com
) environment.
Contact integrations@swan.com to set up your sandbox account.