curl --request GET \
--url https://laso.finance/auth \
--header 'SIGN-IN-WITH-X: <api-key>'import requests
url = "https://laso.finance/auth"
headers = {"SIGN-IN-WITH-X": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'SIGN-IN-WITH-X': '<api-key>'}};
fetch('https://laso.finance/auth', 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://laso.finance/auth",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"SIGN-IN-WITH-X: <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://laso.finance/auth"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("SIGN-IN-WITH-X", "<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://laso.finance/auth")
.header("SIGN-IN-WITH-X", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://laso.finance/auth")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["SIGN-IN-WITH-X"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"auth": {
"id_token": "<string>",
"refresh_token": "<string>",
"expires_in": "<string>"
},
"callable_base_url": "https://laso.finance",
"user_id": "<string>"
}{}Get auth credentials
Free endpoint. Returns an ID token, refresh token, and user ID for the calling wallet. Use the ID token as a Bearer token to call Laso Finance APIs.
Prove wallet ownership by sending a SIGN-IN-WITH-X header: a base64-encoded CAIP-122 signed message. Build it with @x402/extensions/sign-in-with-x (e.g. wrapFetchWithSIWx handles the round-trip automatically). Works for any EVM (Base, eip155:8453) or Solana mainnet wallet.
For ID-token refresh use POST /auth with grant_type=refresh_token.
curl --request GET \
--url https://laso.finance/auth \
--header 'SIGN-IN-WITH-X: <api-key>'import requests
url = "https://laso.finance/auth"
headers = {"SIGN-IN-WITH-X": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'SIGN-IN-WITH-X': '<api-key>'}};
fetch('https://laso.finance/auth', 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://laso.finance/auth",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"SIGN-IN-WITH-X: <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://laso.finance/auth"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("SIGN-IN-WITH-X", "<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://laso.finance/auth")
.header("SIGN-IN-WITH-X", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://laso.finance/auth")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["SIGN-IN-WITH-X"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"auth": {
"id_token": "<string>",
"refresh_token": "<string>",
"expires_in": "<string>"
},
"callable_base_url": "https://laso.finance",
"user_id": "<string>"
}{}Authorizations
Sign-In-With-X (CAIP-122) wallet signature proving ownership of the calling EVM (Base) or Solana wallet. Identity only, no payment. Build it with @x402/extensions/sign-in-with-x (wrapFetchWithSIWx).
Headers
Base64-encoded CAIP-122 signed message proving wallet ownership.
Was this page helpful?