Getting Started with OrbNET APIs

Complete guide to integrating with OrbNET's GraphQL API including authentication, making requests, and handling responses.

GraphQL API v2.0

OrbNET Developer API

Build powerful integrations with OrbNET's GraphQL API. Manage users, devices, subscriptions, billing, and more with our comprehensive developer platform.

0
API Endpoints
0
API Uptime
0
Response Time
0
Support

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.


Authentication

To interact with OrbNET's APIs, you must authenticate using the Login API. Authentication is handled via JSON Web Tokens (JWT).

Authentication:Bearer Token
Required scopes:readwriteadmin
MUTATIONhttps://orbnnet.com/graphql

Authenticate and receive access tokens for API requests.

mutation Login($username: String!, $password: String!) {
  login(username: $username, password: $password) {
    token
    refreshToken
  }
}
ParameterTypeRequiredDescription
usernameString!RequiredYour OrbNET username or email address
passwordString!RequiredYour 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"
  }
}
200Success
{
  "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

POSThttps://api.orbnnet.com/graphql

Required Headers:

Content-Type: application/json
Authorization: Bearer your_jwt_token

Fetch user details with a simple query:

query GetUser($id: ID!) {
  user(id: $id) {
    id
    name
    email
    subscription {
      plan
      expiresAt
    }
    devices {
      id
      name
      lastActive
    }
  }
}
200Success
{
  "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.

400Error Response Example
{
  "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.



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.

View All Endpoints