Disconnect Provider Endpoint
curl --request DELETE \
--url https://api.example.com/api/v1/users/{user_id}/connections/{provider} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/users/{user_id}/connections/{provider}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/users/{user_id}/connections/{provider}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/users/{user_id}/connections/{provider}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/users/{user_id}/connections/{provider}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/api/v1/users/{user_id}/connections/{provider}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/users/{user_id}/connections/{provider}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "VALIDATION_ERROR",
"detail": "body.email: value is not a valid email address: An email address must have an @-sign. (and 1 more)",
"errors": [
{
"loc": [
"body",
"email"
],
"msg": "value is not a valid email address: An email address must have an @-sign.",
"type": "value_error"
},
{
"loc": [
"body",
"first_name"
],
"msg": "String should have at most 100 characters",
"type": "string_too_long"
}
],
"status": 422,
"title": "Unprocessable Content"
}{
"code": "NOT_FOUND",
"detail": "User with ID: 123e4567-e89b-12d3-a456-426614174000 not found.",
"status": 404,
"title": "Not Found"
}{
"code": "NOT_FOUND",
"detail": "User with ID: 123e4567-e89b-12d3-a456-426614174000 not found.",
"status": 404,
"title": "Not Found"
}Connections
Disconnect Provider Endpoint
Disconnect a user from a provider, revoking the connection and clearing tokens.
Also takes an SDK user token, so the mobile SDK can report a sign-out its local-only
signOut() would otherwise hide. That path skips provider deregistration: leaving an
app is no reason to unregister the user from the provider’s API.
DELETE
/
api
/
v1
/
users
/
{user_id}
/
connections
/
{provider}
Disconnect Provider Endpoint
curl --request DELETE \
--url https://api.example.com/api/v1/users/{user_id}/connections/{provider} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/users/{user_id}/connections/{provider}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/users/{user_id}/connections/{provider}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/users/{user_id}/connections/{provider}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/users/{user_id}/connections/{provider}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.example.com/api/v1/users/{user_id}/connections/{provider}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/users/{user_id}/connections/{provider}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": "VALIDATION_ERROR",
"detail": "body.email: value is not a valid email address: An email address must have an @-sign. (and 1 more)",
"errors": [
{
"loc": [
"body",
"email"
],
"msg": "value is not a valid email address: An email address must have an @-sign.",
"type": "value_error"
},
{
"loc": [
"body",
"first_name"
],
"msg": "String should have at most 100 characters",
"type": "string_too_long"
}
],
"status": 422,
"title": "Unprocessable Content"
}{
"code": "NOT_FOUND",
"detail": "User with ID: 123e4567-e89b-12d3-a456-426614174000 not found.",
"status": 404,
"title": "Not Found"
}{
"code": "NOT_FOUND",
"detail": "User with ID: 123e4567-e89b-12d3-a456-426614174000 not found.",
"status": 404,
"title": "Not Found"
}Authorizations
Path Parameters
Response
Successful Response
Was this page helpful?