Overview
The Pump.fun API uses JWT (JSON Web Token) authentication to secure endpoints and ensure authorized access. Most API endpoints require authentication, and it’s recommended to include authentication with all requests to ensure complete data retrieval and avoid potential access issues.Always include your JWT token with API requests to access protected endpoints and retrieve complete data.
Authentication Methods
JWT Bearer Token
All authenticated requests require a valid JWT token passed in theAuthorization header:
Obtaining a JWT Token
Login Endpoint
To obtain a JWT token, make a POST request to the login endpoint:POST https://frontend-api-v3.pump.fun/auth/loginResponse
The login endpoint returns a JWT token in the response body. Store this token securely and include it in subsequent API requests.Using Your Token
Once you have obtained a JWT token, include it in theAuthorization header of all API requests:
Authentication Endpoints
Check Your Profile
Verify your authentication status by retrieving your profile:GET https://frontend-api-v3.pump.fun/auth/my-profileCheck Admin Status
Determine if your account has admin privileges:GET https://frontend-api-v3.pump.fun/auth/is-adminCheck Super Admin Status
Determine if your account has super admin privileges:GET https://frontend-api-v3.pump.fun/auth/is-super-adminLogout
Invalidate your current JWT token:POST https://frontend-api-v3.pump.fun/auth/logoutBest Practices
Store tokens securely
Store tokens securely
Never store JWT tokens in plain text or commit them to version control. Use environment variables or secure credential management systems.
Handle token expiration
Handle token expiration
JWT tokens may expire after a certain period. Implement logic to detect expired tokens (401 Unauthorized responses) and re-authenticate when necessary.
Use HTTPS only
Use HTTPS only
Always use HTTPS when making API requests to protect your JWT token from interception.
Minimize token exposure
Minimize token exposure
Only send tokens to legitimate Pump.fun API endpoints. Never share your token with third parties.
Common Authentication Errors
| Status Code | Error | Description |
|---|---|---|
401 | Unauthorized | Missing or invalid JWT token |
403 | Forbidden | Valid token but insufficient permissions |
404 | Not Found | Endpoint does not exist |