User Unsubscribe
1 min
This API notifies the Pathfix Automation's webhook module to stop listening for webhooks for the given user_id.
The API will always return a success message but will only really work if the user_id is connected via Pathfix OAuth and the webhook is in an active state.
User Unsubscribe API
Call this API to unsubscribe a user from an active webhook.
POST
https://labs.pathfix.com/api/webhook/{{provider}}/user_unsubscribe
Query Parameters
- user_idstringrequiredDescription
- public_keystringrequiredDescription
- private_keystringrequiredDescription
curl
curl --request GET
--url https://labs.pathfix.com/api/webhook/{{provider}}/user_unsubscribe
-d user_id={{user_id}}
-d public_key={{public_key}}
-d private_key={{private_key}}
--header 'Accept: application/json'nodejs
const fetch = require('node-fetch');
let url = 'https://labs.pathfix.com/api/connection';
let options = {
method: 'GET',
headers: {
Accept: 'application/json',
}
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));python
import requests
url = "https://labs.pathfix.com/api/connection"
headers = {"Accept": "application/json"}
response = requests.request("GET", url, headers=headers)
print(response.text)ruby
const fetch = require('node-fetch');
let url = 'https://labs.pathfix.com/api/connection';
let options = {method: 'GET', headers: {Accept: 'application/json'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error('error:' + err));200
{
"rows": [
{
"pincStatus": "success",
"callId": "00dd76ab-f623-48ae-9448-8b3f665ceef5",
"data": "Webhook Subscription Notification sent to Pathfix Automation for user_id: {{user_id}} and provider: {{provider}} "
}
]
}403
Unauthorized