Get token info
curl --request GET \
--url https://lab.trustos.telefonicatech.com/track/v2/erc721/{id}/{tokenId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://lab.trustos.telefonicatech.com/track/v2/erc721/{id}/{tokenId}"
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/track/v2/erc721/{id}/{tokenId}', 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/track/v2/erc721/{id}/{tokenId}",
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/track/v2/erc721/{id}/{tokenId}"
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/track/v2/erc721/{id}/{tokenId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lab.trustos.telefonicatech.com/track/v2/erc721/{id}/{tokenId}")
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{
"statusCode": 200,
"message": "Healthcheck",
"data": {
"type": "ERC721",
"deployer": "did:user:<id>",
"data": {
"contractAddress": "0xebF01265FcE347EE2161f37e49416d947C7a9590",
"name": "MyToken",
"symbol": "MTK",
"networkId": 10004
}
}
}{
"statusCode": 400,
"type": "Validation Error",
"message": "Request parameters are wrong, check requirements",
"errors": [
{
"field": "",
"error": ""
}
]
}{
"statusCode": 401,
"type": "Authentication Error"
}{
"statusCode": 403,
"type": "Forbidden Error",
"message": "Provider not available in your plan. Please, contact B-Team to include it"
}{
"statusCode": 404,
"type": "Not Found Error",
"message": "Token with the requested id not found"
}{
"statusCode": 500,
"type": "Internal Server Error",
"message": "Opps! Something went wrong!"
}ERC-721
Get NFT Info
Retrieves the NFT info identified by its tokenId at the specified collection.
GET
/
erc721
/
{id}
/
{tokenId}
Get token info
curl --request GET \
--url https://lab.trustos.telefonicatech.com/track/v2/erc721/{id}/{tokenId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://lab.trustos.telefonicatech.com/track/v2/erc721/{id}/{tokenId}"
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/track/v2/erc721/{id}/{tokenId}', 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/track/v2/erc721/{id}/{tokenId}",
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/track/v2/erc721/{id}/{tokenId}"
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/track/v2/erc721/{id}/{tokenId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://lab.trustos.telefonicatech.com/track/v2/erc721/{id}/{tokenId}")
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{
"statusCode": 200,
"message": "Healthcheck",
"data": {
"type": "ERC721",
"deployer": "did:user:<id>",
"data": {
"contractAddress": "0xebF01265FcE347EE2161f37e49416d947C7a9590",
"name": "MyToken",
"symbol": "MTK",
"networkId": 10004
}
}
}{
"statusCode": 400,
"type": "Validation Error",
"message": "Request parameters are wrong, check requirements",
"errors": [
{
"field": "",
"error": ""
}
]
}{
"statusCode": 401,
"type": "Authentication Error"
}{
"statusCode": 403,
"type": "Forbidden Error",
"message": "Provider not available in your plan. Please, contact B-Team to include it"
}{
"statusCode": 404,
"type": "Not Found Error",
"message": "Token with the requested id not found"
}{
"statusCode": 500,
"type": "Internal Server Error",
"message": "Opps! Something went wrong!"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Token address or symbol.
Example:
"0xabcdef"
Id of the token to be retrieved.
Example:
"0"
Query Parameters
Network identifier where the NFT collection contract was deployed.
Example:
10004
Was this page helpful?
⌘I