Quick Start Guide
Get started with the WebinOne API in minutes
Quick Start Guide
Get started with the WebinOne API in just a few minutes. This guide will walk you through the essential steps to make your first API request.
Prerequisites
- A WebinOne account with API access enabled
- Your Client ID and Client Secret (available in your admin panel)
- A tool for making HTTP requests (curl, Postman, or your preferred programming language)
Step 1: Obtain an Access Token
All API requests require authentication. First, exchange your credentials for an access token:
curl -X POST https://your-site.webinone.com/api/v1/oauth/token \
-H "Content-Type: multipart/form-data" \
-F "grant_type=client_credentials" \
-F "client_id=YOUR_CLIENT_ID" \
-F "client_secret=YOUR_CLIENT_SECRET" \
-F "scope=public_api"
Step 2: Make Your First API Call
Use the access token to fetch a list of pages from your site:
curl https://your-site.webinone.com/api/v2/admin/pages \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Step 3: Create Your First Resource
Create a new page using the API:
curl -X POST https://your-site.webinone.com/api/v2/admin/module-items \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "ModuleId=1522" \
-d "Name=My First API Page" \
-d "UrlSlug=my-first-api-page" \
-d "Enabled=true" \
-d "ReleaseDate=2026-07-07T00:00:00" \
-d "ExpiryDate=2099-12-31T00:00:00"
Next Steps
- Learn more about authentication
- Understand request formatting
- Work with API responses
- Handle errors gracefully
💡 Pro Tip
Store your access tokens securely and refresh them before they expire (default TTL: 3600 seconds).
Code Examples
// JavaScript Example
const getAccessToken = async () => {
const formData = new FormData();
formData.append('grant_type', 'client_credentials');
formData.append('client_id', 'YOUR_CLIENT_ID');
formData.append('client_secret', 'YOUR_CLIENT_SECRET');
formData.append('scope', 'public_api');
const response = await fetch('https://your-site.webinone.com/api/v1/oauth/token', {
method: 'POST',
body: formData
});
const data = await response.json();
return data.access_token;
};
const fetchPages = async (token) => {
const response = await fetch('https://your-site.webinone.com/api/v2/admin/pages', {
headers: {
'Authorization': `Bearer ${token}`
}
});
return await response.json();
};
// Usage
const token = await getAccessToken();
const pages = await fetchPages(token);
console.log(pages);