Activate subscription and retrieve API token
curl --request POST \
--url https://txline.txodds.com/api/token/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"txSig": "5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C",
"walletSignature": "2BvM...",
"leagues": [
501,
804,
202
]
}
'import requests
url = "https://txline.txodds.com/api/token/activate"
payload = {
"txSig": "5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C",
"walletSignature": "2BvM...",
"leagues": [501, 804, 202]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
txSig: '5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C',
walletSignature: '2BvM...',
leagues: [501, 804, 202]
})
};
fetch('https://txline.txodds.com/api/token/activate', 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://txline.txodds.com/api/token/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'txSig' => '5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C',
'walletSignature' => '2BvM...',
'leagues' => [
501,
804,
202
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://txline.txodds.com/api/token/activate"
payload := strings.NewReader("{\n \"txSig\": \"5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C\",\n \"walletSignature\": \"2BvM...\",\n \"leagues\": [\n 501,\n 804,\n 202\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://txline.txodds.com/api/token/activate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"txSig\": \"5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C\",\n \"walletSignature\": \"2BvM...\",\n \"leagues\": [\n 501,\n 804,\n 202\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://txline.txodds.com/api/token/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"txSig\": \"5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C\",\n \"walletSignature\": \"2BvM...\",\n \"leagues\": [\n 501,\n 804,\n 202\n ]\n}"
response = http.request(request)
puts response.read_body"txoracle_api_123abc456def""<string>""<string>""<string>""<string>"Authentication
Activate subscription and retrieve API token
Activate a user subscription and issue a long-lived API token. Supports three modes based on the on-chain transaction:
- Legacy subscriptions (pass empty leagues array).
- Standard matrix subscriptions (pass empty leagues array).
- Custom matrix subscriptions (pass requested league IDs up to the purchased limit). The entire request intent must be cryptographically signed by the user’s wallet.
POST
/
api
/
token
/
activate
Activate subscription and retrieve API token
curl --request POST \
--url https://txline.txodds.com/api/token/activate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"txSig": "5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C",
"walletSignature": "2BvM...",
"leagues": [
501,
804,
202
]
}
'import requests
url = "https://txline.txodds.com/api/token/activate"
payload = {
"txSig": "5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C",
"walletSignature": "2BvM...",
"leagues": [501, 804, 202]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
txSig: '5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C',
walletSignature: '2BvM...',
leagues: [501, 804, 202]
})
};
fetch('https://txline.txodds.com/api/token/activate', 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://txline.txodds.com/api/token/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'txSig' => '5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C',
'walletSignature' => '2BvM...',
'leagues' => [
501,
804,
202
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://txline.txodds.com/api/token/activate"
payload := strings.NewReader("{\n \"txSig\": \"5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C\",\n \"walletSignature\": \"2BvM...\",\n \"leagues\": [\n 501,\n 804,\n 202\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://txline.txodds.com/api/token/activate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"txSig\": \"5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C\",\n \"walletSignature\": \"2BvM...\",\n \"leagues\": [\n 501,\n 804,\n 202\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://txline.txodds.com/api/token/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"txSig\": \"5kb6gnsSu1inDF9nCVV3WcgKryyBFGFkrYS28Sp1avS8mq6Xcw6iq3yzkBTjmq8bGptgqYTXPmjyWECzKzUxYG3C\",\n \"walletSignature\": \"2BvM...\",\n \"leagues\": [\n 501,\n 804,\n 202\n ]\n}"
response = http.request(request)
puts response.read_body"txoracle_api_123abc456def""<string>""<string>""<string>""<string>"Authorizations
User's session JWT.
Headers
Bearer token for the user session JWT.
Body
application/json
The cryptographic payload containing the transaction signature, wallet signature, and requested leagues.
Response
The newly generated API token.
The response is of type string.
Was this page helpful?
Start a new guest sessionRequest a partially signed purchase quote given the wallet public key and required TxLINE amount in whole units
⌘I