Get a connection session
curl --request GET \
--url https://api.swapnice.com/v1/connection-sessions/{session_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swapnice.com/v1/connection-sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.swapnice.com/v1/connection-sessions/{session_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(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>"
}
]
}
}Connection sessions
Get a connection session
Poll session status until authorized, completed, expired, or revoked.
GET
/
v1
/
connection-sessions
/
{session_id}
Get a connection session
curl --request GET \
--url https://api.swapnice.com/v1/connection-sessions/{session_id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.swapnice.com/v1/connection-sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.swapnice.com/v1/connection-sessions/{session_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(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>"
}
]
}
}Poll session status until authorized, completed, expired, or revoked.
Statuses:
created, authorized, completed, expired, revoked.Authorizations
OAuth 2.1 authorization code with PKCE. Implicit and password flows are unsupported.
Path Parameters
Response
Connection session state.
Available options:
created, authorized, completed, expired, revoked Available options:
account_linking, personalization, analytics, support, event_enrichment, profile_resolution, measurement ⌘I