You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`ServerClient` exposes three methods for managing a user's connected accounts
121
+
122
+
### List Available Connections
123
+
124
+
This method provides a list of connections that have been enabled for use with Connected Accounts for Token Vault that the user may use to connect accounts.
125
+
126
+
This method requires the My Account `read:me:connected_accounts` scope to be enabled for your application and configured for MRRT.
127
+
128
+
This method supports paging via optional the use of `take` parameter. Without this parameters, a default page size of 10 is used. Subsequent pages can be retrieved by also passing the `from_param` parameter with the token returned in the `next` property of the response
This method provides a list of accounts that you have already connected.
141
+
142
+
This method requires the My Account `read:me:connected_accounts` scope to be enabled for your application and configured for MRRT.
143
+
144
+
An optional `connection` parameter can be used to filter the connected accounts for a specific connection, otherwise all connected accounts will be returns
145
+
146
+
This method supports paging via optional the use of `take` parameter. Without this parameters, a default page size of 10 is used. Subsequent pages can be retrieved by also passing the `from_param` parameter with the token returned in the `next` property of the response
All SDK errors inherit from `Auth0Error`. For most cases, catch `Auth0Error` to handle all errors uniformly. Only catch specific error types when you need to take different actions based on the error.
-**`Auth0Error`** (base): Catch this for general error handling
218
+
-**`MyAccountApiError`**: My Account API errors with `status`, `detail`, and optional `validation_errors`
219
+
-**`InvalidArgumentError`**: Invalid parameter value
220
+
-**`MissingRequiredArgumentError`**: Required parameter not provided
221
+
222
+
## A note about scopes
223
+
224
+
If multiple pieces of Connected Account functionality are intended to be used, it is recommended that you set the default `scope` for the My Account audience when creating you `ServerClient`. This will avoid multiple token requests as without it a new token will be requested for each scope used. This can be done by configuring the `scope` dictionary in the `authorization_params` when configuring the SDK. Each value in the dictionary corresponds to an `audience` and sets the `default` requested scopes for that audience.
225
+
226
+
```python
227
+
server_client = ServerClient(
228
+
domain="YOUR_AUTH0_DOMAIN",
229
+
client_id="YOUR_CLIENT_ID",
230
+
client_secret="YOUR_CLIENT_SECRET",
231
+
secret="YOUR_SECRET",
232
+
authorization_params={
233
+
"scope" {
234
+
"https://YOUR_AUTH0_DOMAIN/me/": "create:me:connected_accounts read:me:connected_accounts delete:me:connected_accounts", # scopes required for the My Account audience
235
+
# default scopes for custom API audiences can also be defined
0 commit comments