Set external provider identifier
Link an allowed external account to an existing Basecone user account.
POST users/:userId/externalprovider
Request properties
| Property | Type | Length | Description | Required |
|---|---|---|---|---|
| ProviderKey | String | 250 | Unique external provider key. | It is always required. |
| ExternalId | String | 250 | User external account identifier. | It is always required. |
Please note that unlike other API requests, pagination and sorting are not supported.
This request does not support authentication though a machine to machine bearer token.
Example request
{
providerKey: 'external provider unique provider key',
externalId: 'user's external provider identifier'
}
Success response
Upon successful operation a 200 status code will be returned, containing the created accounting system identifier.
Error response
Case an error occurs, a 400 status code will be returned, containing error message(s).
Example response:
{
"message": "One or more validation errors occurred.",
"code": "validation_error",
"_metadata":[
{
"field": "providerKey",
"message": "External provider not supported"
}
],
"_moreInfo": "http://developers.basecone.com/lookup/validation_error"
}
Possible error responses
| Status code | Error code | Details |
|---|---|---|
| 400 | invalid_request_payload | External provider not supported |
| 400 | invalid_request_payload | ExternalId should be between 1 and 250 characters long |
| 400 | invalid_request_payload | Operation not permitted for the specified client |
| 400 | invalid_request_payload | User does not exist. |
| 400 | invalid_request_payload | External Id already in use for the specific provider. |
| 403 | forbidden | User is not allowed to perform the operation |
