curl --request GET \
--url https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature \
--header 'Authorization: Bearer <token>'import requests
url = "https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature', 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://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature",
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: 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://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature"
req, _ := http.NewRequest("GET", 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.get("https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> <root> <badge> <name>Certificate</name> <description>Certificate description</description> <content> <key>val1213ue</key> </content> </badge> <issuedOn>1695286575991</issuedOn> <datetime>21-09-2023 10:56:15 GMT+02:00</datetime> <expires/> <ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" Id=\"id-71309bda9649683e3717a459fd783ca2\"> </ds:Signature> </root>"{
"statusCode": 401,
"type": "Authentication Error",
"message": "User credentials are wrong"
}{
"statusCode": 403,
"type": "Forbidden Error",
"message": "User is not qualified, please try again with a qualified user"
}{
"statusCode": 404,
"type": "Not Found Error",
"message": "Certificate with certId {certId} not found"
}{
"statusCode": 422,
"type": "Unsigned Certificate Error",
"message": "Certificate with certId {certId} is not signed, you cannot download it"
}{
"statusCode": 500,
"type": "Internal Server Error",
"message": "Oops! Something went wrong, please try again later"
}Download Signature
Retrieves the qualified signature of a previously signed certificate.
curl --request GET \
--url https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature \
--header 'Authorization: Bearer <token>'import requests
url = "https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature', 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://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature",
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: 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://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature"
req, _ := http.NewRequest("GET", 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.get("https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lab.trustos.telefonicatech.com/cert/v2/certificates/{type}/{id}/signature")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> <root> <badge> <name>Certificate</name> <description>Certificate description</description> <content> <key>val1213ue</key> </content> </badge> <issuedOn>1695286575991</issuedOn> <datetime>21-09-2023 10:56:15 GMT+02:00</datetime> <expires/> <ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" Id=\"id-71309bda9649683e3717a459fd783ca2\"> </ds:Signature> </root>"{
"statusCode": 401,
"type": "Authentication Error",
"message": "User credentials are wrong"
}{
"statusCode": 403,
"type": "Forbidden Error",
"message": "User is not qualified, please try again with a qualified user"
}{
"statusCode": 404,
"type": "Not Found Error",
"message": "Certificate with certId {certId} not found"
}{
"statusCode": 422,
"type": "Unsigned Certificate Error",
"message": "Certificate with certId {certId} is not signed, you cannot download it"
}{
"statusCode": 500,
"type": "Internal Server Error",
"message": "Oops! Something went wrong, please try again later"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Type of the certificate identifier.
certID, externalId, fileHash, hash Identifier of the certificate.
1
Query Parameters
PIN of the certificate (if the certificate is private).
"1234"
Response
Successful certificate signature retrieval.
XML file with the qualified certificate signature.
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?> <root> <badge> <name>Certificate</name> <description>Certificate description</description> <content> <key>val1213ue</key> </content> </badge> <issuedOn>1695286575991</issuedOn> <datetime>21-09-2023 10:56:15 GMT+02:00</datetime> <expires/> <ds:Signature xmlns:ds=\"http://www.w3.org/2000/09/xmldsig#\" Id=\"id-71309bda9649683e3717a459fd783ca2\"> </ds:Signature> </root>"
Was this page helpful?