Table of Contents |
---|
Introduction
In instances where there is a need to get the Account Token of the current user defined by the security token, by using the Thinksurance Public API V1, referred to as "the API," a dedicated endpoint facilitates this capability. This endpoint is accessible at the path /api/account/get/tokens/{:token}. It anticipates a comprehensive payload as part of the HTTP request, encompassing the requisite broker data.
Endpoint
To create a broker via the API, it is imperative to send an HTTP POST GET request to the endpoint /api/ipn/account/get/tokens/{:token}. The parameterised segment of the endpoint, denoted as "{:token}," contains to the security token retrievable by the partner during the Authentication process on the API. The rest of the HTTP request is a JSON payload of the request body.
Action name | get account token |
---|---|
HTTP path | /api/ipn/account/get/tokens/{:token}
|
HTTP method | POSTGET |
Attributes of the HTTP request
...
HTTP Request Header | |||
---|---|---|---|
Authorization | string | required | A security token provided from Authentication endpoint. |
Attributes of the HTTP response
Success response | |||
---|---|---|---|
JSON array of objects containing: | |||
name | string | required | A name for the requested account. |
aToken | string | required | An identifier for the requested account. |
Failed response | |||
error | string | required | It contains a reason for the failed request. |
Examples
As previously stated, to execute get account token, it is imperative to dispatch a POST HTTP request to the /api/account/get/tokens/{:token} endpoint of the API. Below, instances of potential communication between the API and consumers are provided.
HTTP Request | |||||
| |||||
Successful HTTP Response | |||||
| |||||
Failed HTTP Response | |||||
|