Skip to main content

Verify Privy Payload

Schema for Privy wallet verification requests in the Intraverse Backend API v2.

Description​

The Verify Privy Payload schema defines the structure of requests for verifying Privy wallet authentication tokens. This is used for wallet-based authentication flows.

Class Validator Schema​

import { IsString } from "class-validator";

export class VerifyPrivyPayload {
@IsString()
public token: string;
}

TypeScript Type​

interface VerifyPrivyPayload {
token: string;
}

Example Request​

{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}

Field Descriptions​

FieldTypeRequiredDescription
tokenstringYesPrivy authentication token to verify

Usage Example​

// Verify Privy token
const response = await fetch("https://api.intraverse.io//v2/authentication/privy/verify", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
token: privyAuthToken,
}),
});

const result = await response.json();

if (result.token) {
// Token verification successful
console.log("Privy token verified:", result.token);
}

API Endpoint​

This schema is used by the following endpoint:

  • POST /v2/authentication/privy/verify - Verify Privy authentication token

Authentication​

This endpoint is public and does not require authentication. It's one of the few endpoints that doesn't require dual authentication.

Note: Most other API endpoints require both:

  • JWT Bearer Token: Authorization: Bearer <jwt_token>
  • Game Key Header: x-game-key: <client_key> or x-game-server-key: <server_key>

Response Format​

The endpoint returns a response with the following structure:

interface VerifyPrivyResponse {
token: string;
}

Next Steps​