Use this to create a new connection. When a new connection request is made the server will create a job that will process the following steps if no MFA challenge is met:
and these steps if an MFA challenge is met:
Check institution authorization type
To create a connection you need to check the authorization type for the institution.
- If Institutions authorization =
user
then loginId and password are mandatory, and user token is not required- If Institutions authorization =
token
then userToken is mandatory and login credentials are not required- If Institutions authorization =
user-mfa
then the user will always be met with an MFA challenge step immediately after their credentials have been verified- If Institutions authorization =
user-mfa-intermittent
then the user will sometimes be met with an MFA challenge step immediately after their credentials have been verified
You can check the status of each step by querying the job resource (returned when the connection is created).
Arguments | |
---|---|
loginId | The users institution login ID. Mandatory if Institutions authorization = |
password | The users institution password. Mandatory if Institutions authorization = |
userToken | The userToken. Mandatory if Institutions authorization = |
securityCode | User's institution security code. Mandatory if required by institution's login process |
secondaryLoginId | User's institution secondary login id. Mandatory if required by institution's login process |
institution | Only the id of the institution is required |
Note that the time it takes to complete the processes above will vary depending on the volume of data along with the general latency between our servers and the financial institution. As a rough guide this entire process could take anywhere between 3 - 30 secs.
Returns
Returns a created job resource, if the operation succeeded. Returns an error if the post failed (e.g. not supplying required properties).
In order to avoid duplicate jobs
If you attempt to create or refresh a connection while a job is either queued or still in progress, the API will return a 200 status with the original job instead of a newly created job.
POST /users/{user.id}/connections
POST /users/ea3a81/connections HTTP/1.1
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
{
"loginId": "gavinBelson",
"password": "hooli2016",
"institution":{
"id":"AU00000"
}
}
POST /users/ea3a81/connections HTTP/1.1
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
{
"userToken": "token:PTln18RhwL",
"institution":{
"id":"AU19301"
}
}
HTTP/1.1 202 Accepted
Content-Type: application/json
{
"type": "job",
"id": "61723",
"links": {
"self": "https://au-api.basiq.io/jobs/61723"
}
}