Getting Started with OrbNET APIs
Complete guide to integrating with OrbNET's GraphQL API including authentication, making requests, and handling responses.
OrbNET Developer API
Build powerful integrations with OrbNET's GraphQL API. Manage users, devices, subscriptions, billing, and more with our comprehensive developer platform.
Why OrbNET API?
OrbNET's backend is built with Java Spring, leveraging GraphQL for maximum flexibility and efficiency. Build exactly what you need with our powerful API.
Fast & Efficient
GraphQL lets you request exactly what you need - no more, no less. Reduce bandwidth and improve performance.
Secure by Default
JWT authentication with refresh tokens, rate limiting, and role-based access control keeps your integrations secure.
Real-time Updates
Subscribe to changes and get instant notifications. Perfect for live dashboards and monitoring systems.
Why GraphQL?
Unlike REST APIs, GraphQL allows you to fetch multiple resources in a single request, reducing network overhead and improving performance. You define the shape of the response, making it perfect for mobile and web applications.
System Architecture
Explore the complete OrbVPN system architecture to understand how different components interact.
Quick Start Guide
Get up and running with OrbNET API in minutes.
Get Your Credentials
Request API access from your OrbNET dashboard or contact support to enable API permissions for your account.
Authenticate
Use the Login mutation to obtain your JWT access token and refresh token for making authenticated requests.
Make Your First Request
Start with a simple query to fetch user data or list available servers. Use our examples as templates.
Build Your Integration
Explore our comprehensive API documentation to build powerful features for user management, billing, and more.
Authentication
To interact with OrbNET's APIs, you must authenticate using the Login API. Authentication is handled via JSON Web Tokens (JWT).
https://orbnnet.com/graphqlAuthenticate and receive access tokens for API requests.
mutation Login($username: String!, $password: String!) {
login(username: $username, password: $password) {
token
refreshToken
}
}| Parameter | Type | Required | Description |
|---|---|---|---|
username | String! | Required | Your OrbNET username or email address |
password | String! | Required | Your OrbNET account password |
Request:
{
"query": "mutation Login($username: String!, $password: String!) { login(username: $username, password: $password) { token refreshToken } }",
"variables": {
"username": "your_username",
"password": "your_password"
}
}{
"data": {
"login": {
"token": "eyJhbGciOiJIUzI1NiIs...",
"refreshToken": "dGhpcyBpcyBhIHJlZnJlc2..."
}
}
}Access Token
Include the JWT in the Authorization header for all authenticated requests: Authorization: Bearer your_jwt_token
Refresh Token
Use the refresh token to obtain a new access token when the current one expires (typically after 24 hours).
Making API Requests
https://api.orbnnet.com/graphqlRequired Headers:
Content-Type: application/json
Authorization: Bearer your_jwt_tokenFetch user details with a simple query:
query GetUser($id: ID!) {
user(id: $id) {
id
name
email
subscription {
plan
expiresAt
}
devices {
id
name
lastActive
}
}
}{
"data": {
"user": {
"id": "user_123",
"name": "John Doe",
"email": "john@example.com",
"subscription": {
"plan": "premium",
"expiresAt": "2025-12-31T00:00:00Z"
},
"devices": [
{ "id": "dev_1", "name": "iPhone", "lastActive": "2025-01-15T10:30:00Z" }
]
}
}
}Error Handling
OrbNET APIs follow standard GraphQL response structures. Always check for errors before processing data.
Success Response
Contains 'data' field with requested information. No 'errors' field present.
Error Response
Contains 'errors' array with message, locations, and path. 'data' may be null.
{
"errors": [
{
"message": "Invalid credentials",
"locations": [{ "line": 2, "column": 3 }],
"path": ["login"],
"extensions": {
"code": "AUTHENTICATION_ERROR"
}
}
],
"data": null
}Best Practices
Check for Errors First
Before processing the data field, always verify if the errors field is present to handle failures gracefully.
Handle Token Expiry
Implement automatic token refresh using the refreshToken when you receive 401 authentication errors.
Request Only What You Need
GraphQL's power lies in selective queries. Only request the fields you actually need to reduce response size.
Implement Retry Logic
Add exponential backoff for transient failures. Our API has rate limits - respect 429 responses.
Development Tools
Choose the right tools for your workflow.
GraphQL Playground
Interactive IDE for exploring GraphQL APIs with real-time query execution and auto-complete.
Postman
Versatile API testing tool with GraphQL support, collections, and team collaboration features.
Apollo Client
Comprehensive state management library for JavaScript applications with built-in caching.
Explore the API
Dive into our comprehensive API documentation organized by category.
User Management
Create, update, and manage user accounts. Handle profiles, roles, and permissions.
Device Management
Register devices, manage sessions, and control VPN connections across platforms.
Server Management
List servers, check status, and get optimized server recommendations for users.
Billing & Subscriptions
Handle payments, manage subscriptions, generate invoices, and process refunds.
Quick Links
Authenticate users and get access tokens
Register new user accounts
Retrieve user profile information
Authenticate and register devices
Need Help?
Our developer support team is available 24/7 to help you with integration questions. Check out our API reference or reach out through the support portal.
Ready to Build?
Start building powerful integrations with OrbNET API. Get your API credentials and explore our comprehensive documentation.