Get x402 Session
curl --request GET \
--url https://api.agentwallex.com/api/v1/x402/sessions/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.agentwallex.com/api/v1/x402/sessions/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.agentwallex.com/api/v1/x402/sessions/{id}', 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.agentwallex.com/api/v1/x402/sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.agentwallex.com/api/v1/x402/sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.agentwallex.com/api/v1/x402/sessions/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentwallex.com/api/v1/x402/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agent_id": "<string>",
"budget_limit": "<string>",
"budget_spent": "<string>",
"budget_remaining": "<string>",
"chain": "<string>",
"allowed_urls": [
"<string>"
],
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"code": "authentication_failed",
"type": "authentication_error",
"message": "The provided API key is invalid or expired."
}{
"code": "insufficient_permissions",
"type": "authorization_error",
"message": "You do not have permission to perform this action."
}{
"code": "resource_not_found",
"type": "not_found_error",
"message": "The requested resource was not found."
}{
"code": "rate_limit_exceeded",
"type": "rate_limit_error",
"message": "Too many requests. Please retry after a short delay."
}{
"code": "server_error",
"type": "internal_error",
"message": "An unexpected error occurred. Please try again later."
}x402
x402 세션 조회
현재 예산 상태를 포함한 단일 세션을 조회합니다.
GET
/
api
/
v1
/
x402
/
sessions
/
{id}
Get x402 Session
curl --request GET \
--url https://api.agentwallex.com/api/v1/x402/sessions/{id} \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.agentwallex.com/api/v1/x402/sessions/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.agentwallex.com/api/v1/x402/sessions/{id}', 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.agentwallex.com/api/v1/x402/sessions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.agentwallex.com/api/v1/x402/sessions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.agentwallex.com/api/v1/x402/sessions/{id}")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentwallex.com/api/v1/x402/sessions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agent_id": "<string>",
"budget_limit": "<string>",
"budget_spent": "<string>",
"budget_remaining": "<string>",
"chain": "<string>",
"allowed_urls": [
"<string>"
],
"expires_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}{
"code": "authentication_failed",
"type": "authentication_error",
"message": "The provided API key is invalid or expired."
}{
"code": "insufficient_permissions",
"type": "authorization_error",
"message": "You do not have permission to perform this action."
}{
"code": "resource_not_found",
"type": "not_found_error",
"message": "The requested resource was not found."
}{
"code": "rate_limit_exceeded",
"type": "rate_limit_error",
"message": "Too many requests. Please retry after a short delay."
}{
"code": "server_error",
"type": "internal_error",
"message": "An unexpected error occurred. Please try again later."
}경로 매개변수
string
필수
세션 ID (예:
sess_xyz789).예시
curl -X GET https://api.agentwallex.com/api/v1/x402/sessions/sess_xyz789 \
-H "X-API-Key: awx_your_api_key"
인증
ApiKeyAuthBearerAuth
API key authentication. Keys are prefixed with awx_.
경로 매개변수
The session ID (e.g., sess_xyz789).
응답
Session details.
An x402 payment session with a pre-authorized spending budget.
Unique session identifier (e.g., sess_xyz789).
Agent whose wallet funds the session.
Maximum total amount the session can spend.
Total amount spent so far.
Remaining budget available.
CAIP-2 chain identifier for settlement.
Session status.
사용 가능한 옵션:
active, expired, deleted URLs this session is authorized to pay.
ISO 8601 expiration timestamp.
ISO 8601 creation timestamp.
⌘I