Skip to content

Bind Auth Provider

PUT api/account/bind/auth-provider

This is used to bind a third-party authentication provider.

Supported Provider:

  • Facebook

Example Request

Terminal window
curl -X 'PUT' \
'http://localhost:8080/api/account/bind/auth-provider' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"auth_provider": 3,
"auth_unique_identifier": ACCOUNT_UNIQUE_IDENTIFIER",
"auth_provider_token": ACCOUNT_AUTHENTICATION_TOKEN
}'

Request Body

Content Type: application/json
Content: Bind Auth Provider

{
"auth_provider": 0,
"auth_unique_identifier": "string",
"auth_provider_token": "string"
}

Responses

200 - OK

The request was successful

Content Type: text/plain
Content:

Successfully binded!
Successfully unbinded!

400 - Bad Request

Validation Error

Content Type: application/json
Content:

{
"param_name": [
"string"
],
"param_name_2": [
"string"
],
}
{
"error_message": "Failed to authenticate with {provider}"
}

401 - Unauthorized

The request requires valid bearer token, but none were provided, or the bearer token is invalid.

429 - Too Many Requests

The user has exceeded the rate limit of 10 requests per minute.

500 - Internal Server Error

There is an issue with the backend. Sentry will provide a more detailed report on the problem.