Connected Account
ENDPOINTS |
|
GET | /connected_account |
POST | /connected_account/auth_request |
POST | /connected_account/{id}/set_default |
The Connected Account object
Attributes
Attributes | The Connected Account object |
| { |
Retrieve Connected Account
Retrieves Connected Account object(s) matching the provided parameters.
Parameters
| GET |
Returns
connected_accounts
contains a list of matching Connected Account object(s). The id
is what is required to launch Wrkflow that require a Connected Account.
{
"totalCount": 2,
"connected_accounts": [
{
"id": "daDK1-x6547-2fzz-fd123",
"nickname": "App ABC",
"app_reference": "abc-online/auth",
"status": "valid",
"default": true,
"auth_request_id": null
},
{
"id": "",
"nickname": "Alternate ABC",
"app_reference": "abc-online/auth",
"status": "pending",
"default": false,
"auth_request_id": 3653
}
]
}
Connected Account Authorization Request
Request to authorize a Connected Account and create it once authorization has been received.
Parameters
| POST |
Returns
The return value includes auth_request_id
which can be used to track the status of the request. action_required
contains a link that needs to be passed to the end user to go through the authorization process required. expiry_datetime
is the expiry time in unix format that the request will remain open for the user to take action, after which it will be cancelled.
{
"status": "received",
"auth_request_id": "3213",
"expiry_datetime": 33432432432,
"action_required": "http://account.wrk.com/auth/etc?session=43242dasd"
}
Set a default Connected Account
A default Connected Account is required for every app_reference
. The first Connected Account created for an app_reference
is the de facto default one and subsequent ones are not. Use this endpoint to change the default Connected Account to a different one.
Parameters
| POST |
Returns
If successful, a dictionary with Boolean property status
where true
denotes a successful receipt of the answer.
{ "status": true }