Get Hosted Consent Request
curl --request GET \
--url https://api.yapily.com/hosted/consent-requests/{consentRequestId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.yapily.com/hosted/consent-requests/{consentRequestId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.yapily.com/hosted/consent-requests/{consentRequestId}', 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.yapily.com/hosted/consent-requests/{consentRequestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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.yapily.com/hosted/consent-requests/{consentRequestId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yapily.com/hosted/consent-requests/{consentRequestId}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/hosted/consent-requests/{consentRequestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "2dbfd85b4f2940c6a206e96dd90e52d0"
},
"data": {
"consentRequestId": "507e515f-c22d-4bab-9801-606c94e7f749",
"consentId": "b22a1fe6-1e91-45b3-8ba0-6fdb1708e7bd",
"userId": "3ddf5dd0-aa48-4d0f-baa7-fa057e9e911d",
"applicationUserId": "string",
"applicationId": "64949de6-6510-4d70-9500-d4aa094c506c",
"institutionIdentifiers": {
"institutionId": "modelo-sandbox",
"institutionCountryCode": "GB"
},
"userSettings": {
"language": "en",
"location": "GB"
},
"redirectUrl": "https://tpp-application.com/",
"createdAt": "2024-09-13T11:14:04.766Z",
"authorisationExpiresAt": "2024-10-10T11:36:54.887Z",
"status": "AUTHORIZED",
"phases": [
{
"phaseName": "INITIATED",
"phaseCreatedAt": "2024-09-11T16:19:59.707Z"
},
{
"phaseName": "INSTITUTION_SUBMITTED",
"phaseCreatedAt": "2024-09-11T16:20:19.097Z"
},
{
"phaseName": "AUTHORISATION_INITIATED",
"phaseCreatedAt": "2024-09-11T16:20:47.077Z"
},
{
"phaseName": "AUTHORISATION_CREATED",
"phaseCreatedAt": "2024-09-11T16:20:48.212Z"
},
{
"phaseName": "CONSENT_POLLING_STARTED",
"phaseCreatedAt": "2024-09-11T16:20:57.654Z"
},
{
"phaseName": "CONSENT_POLLING_ENDED",
"phaseCreatedAt": "2024-09-11T16:20:58.288Z"
},
{
"phaseName": "AUTHORISED",
"phaseCreatedAt": "2024-09-11T16:20:58.288Z"
},
{
"phaseName": "FINISHED",
"phaseCreatedAt": "2024-09-11T16:20:58.288Z"
}
],
"consentToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJJTlNUSVRVVElPTiI6Im1vZGVsby1zYW5kYm94IiwiQ09OU0VOVCI6IjU2YTQyMjQ0LTQxNGEtNGI1Mi04YzRmLTRhZDJhNTBlODJmZSIsIkFQUExJQ0FUSU9OX1VTRVJfSUQiOiJtb2ZlLTIiLCJVU0VSIjoiY2E0MTJmZGYtNWEzMC00M2EyLTg4YjctNTk2NGEyNGE4ZTU1In0.gorwpnUjSr5dzQJLR32M2geWOj7yK9xMsZmq27ssY9xP_xGmWfUL_aqVHYyQ4r5KWw6Xb6RjvO839st8chJLtg"
}
}{
"error": {
"tracingId": "0c2d0973bdd24224a65e5d0f7d1b6154",
"code": 401,
"status": "UNAUTHORIZED",
"supportUrl": "https://support.yapily.com/",
"source": "YAPILY",
"issues": [
{
"type": "CREDENTIALS",
"code": 10700,
"message": "Authorization header invalid or credentials not authenticated"
}
]
}
}{
"error": {
"tracingId": "0c2d0973bdd24224a65e5d0f7d1b6154",
"code": 404,
"status": "NOT FOUND",
"supportUrl": "https://support.yapily.com/",
"source": "YAPILY",
"issues": [
{
"type": "INVALID_REQUEST",
"code": 10800,
"message": "Resource not found"
}
]
}
}{
"error": {
"tracingId": "0c2d0973bdd24224a65e5d0f7d1b6154",
"code": 500,
"status": "INTERNAL SERVER ERROR",
"supportUrl": "https://support.yapily.com/",
"source": "YAPILY",
"issues": [
{
"type": "INTERNAL_SERVER_ERROR",
"code": 11000,
"message": "Unexpected server error"
}
]
}
}{
"error": {
"code": 401,
"status": "UNAUTHORIZED",
"message": "Full authentication is required to access this resource"
}
}Hosted Consent Pages
Get Hosted Consent Request
Used to get details of a hosted consent request
Get Hosted Consent Request
curl --request GET \
--url https://api.yapily.com/hosted/consent-requests/{consentRequestId} \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://api.yapily.com/hosted/consent-requests/{consentRequestId}"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://api.yapily.com/hosted/consent-requests/{consentRequestId}', 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.yapily.com/hosted/consent-requests/{consentRequestId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>"
],
]);
$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.yapily.com/hosted/consent-requests/{consentRequestId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.yapily.com/hosted/consent-requests/{consentRequestId}")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.yapily.com/hosted/consent-requests/{consentRequestId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"meta": {
"tracingId": "2dbfd85b4f2940c6a206e96dd90e52d0"
},
"data": {
"consentRequestId": "507e515f-c22d-4bab-9801-606c94e7f749",
"consentId": "b22a1fe6-1e91-45b3-8ba0-6fdb1708e7bd",
"userId": "3ddf5dd0-aa48-4d0f-baa7-fa057e9e911d",
"applicationUserId": "string",
"applicationId": "64949de6-6510-4d70-9500-d4aa094c506c",
"institutionIdentifiers": {
"institutionId": "modelo-sandbox",
"institutionCountryCode": "GB"
},
"userSettings": {
"language": "en",
"location": "GB"
},
"redirectUrl": "https://tpp-application.com/",
"createdAt": "2024-09-13T11:14:04.766Z",
"authorisationExpiresAt": "2024-10-10T11:36:54.887Z",
"status": "AUTHORIZED",
"phases": [
{
"phaseName": "INITIATED",
"phaseCreatedAt": "2024-09-11T16:19:59.707Z"
},
{
"phaseName": "INSTITUTION_SUBMITTED",
"phaseCreatedAt": "2024-09-11T16:20:19.097Z"
},
{
"phaseName": "AUTHORISATION_INITIATED",
"phaseCreatedAt": "2024-09-11T16:20:47.077Z"
},
{
"phaseName": "AUTHORISATION_CREATED",
"phaseCreatedAt": "2024-09-11T16:20:48.212Z"
},
{
"phaseName": "CONSENT_POLLING_STARTED",
"phaseCreatedAt": "2024-09-11T16:20:57.654Z"
},
{
"phaseName": "CONSENT_POLLING_ENDED",
"phaseCreatedAt": "2024-09-11T16:20:58.288Z"
},
{
"phaseName": "AUTHORISED",
"phaseCreatedAt": "2024-09-11T16:20:58.288Z"
},
{
"phaseName": "FINISHED",
"phaseCreatedAt": "2024-09-11T16:20:58.288Z"
}
],
"consentToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJJTlNUSVRVVElPTiI6Im1vZGVsby1zYW5kYm94IiwiQ09OU0VOVCI6IjU2YTQyMjQ0LTQxNGEtNGI1Mi04YzRmLTRhZDJhNTBlODJmZSIsIkFQUExJQ0FUSU9OX1VTRVJfSUQiOiJtb2ZlLTIiLCJVU0VSIjoiY2E0MTJmZGYtNWEzMC00M2EyLTg4YjctNTk2NGEyNGE4ZTU1In0.gorwpnUjSr5dzQJLR32M2geWOj7yK9xMsZmq27ssY9xP_xGmWfUL_aqVHYyQ4r5KWw6Xb6RjvO839st8chJLtg"
}
}{
"error": {
"tracingId": "0c2d0973bdd24224a65e5d0f7d1b6154",
"code": 401,
"status": "UNAUTHORIZED",
"supportUrl": "https://support.yapily.com/",
"source": "YAPILY",
"issues": [
{
"type": "CREDENTIALS",
"code": 10700,
"message": "Authorization header invalid or credentials not authenticated"
}
]
}
}{
"error": {
"tracingId": "0c2d0973bdd24224a65e5d0f7d1b6154",
"code": 404,
"status": "NOT FOUND",
"supportUrl": "https://support.yapily.com/",
"source": "YAPILY",
"issues": [
{
"type": "INVALID_REQUEST",
"code": 10800,
"message": "Resource not found"
}
]
}
}{
"error": {
"tracingId": "0c2d0973bdd24224a65e5d0f7d1b6154",
"code": 500,
"status": "INTERNAL SERVER ERROR",
"supportUrl": "https://support.yapily.com/",
"source": "YAPILY",
"issues": [
{
"type": "INTERNAL_SERVER_ERROR",
"code": 11000,
"message": "Unexpected server error"
}
]
}
}{
"error": {
"code": 401,
"status": "UNAUTHORIZED",
"message": "Full authentication is required to access this resource"
}
}Authorizations
Use HTTP Basic Authentication with your Application ID as username and Application Secret as password. Manage credentials in the Yapily Console. See Authentication for details.
Headers
The sub-application ID to which event type is being subscribed to
Path Parameters
Unique Identifier of the consent request
Was this page helpful?
⌘I