Cancel a connection session
curl --request DELETE \
--url https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/connection-sessions/{session_id} \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'DELETE',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/connection-sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/connection-sessions/{session_id}"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"id": "<string>",
"app_id": "<string>",
"customer_id": "<string>",
"status": "created",
"requested_purposes": [
"account_linking"
],
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"consent_receipt_id": "<string>",
"swapnice_user_id": "<string>"
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}Connection sessions
Cancel a connection session
Revoke an unused linking session.
DELETE
/
v1
/
connection-sessions
/
{session_id}
Cancel a connection session
curl --request DELETE \
--url https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/connection-sessions/{session_id} \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'const options = {
method: 'DELETE',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/connection-sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://swapnice-gateway-dev.ceo-cbc.workers.dev/v1/connection-sessions/{session_id}"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.delete(url, headers=headers)
print(response.text){
"id": "<string>",
"app_id": "<string>",
"customer_id": "<string>",
"status": "created",
"requested_purposes": [
"account_linking"
],
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"consent_receipt_id": "<string>",
"swapnice_user_id": "<string>"
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}{
"error": {
"code": "consent_denied",
"message": "<string>",
"request_id": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"field": "<string>"
}
]
}
}Revoke an unused linking session.
Requires
connections:write. Create a new session if the user needs to try again.Authorizations
Headers
Response
Session canceled or already terminal.