HTTP API Guides
Getting Started

Introduction

Welcome to Pagecall! Our platform enables you to easily add real-time audio, video, and whiteboard interactions to your applications, making it easier than ever to connect with your users.

Throughout this guide, we’ll provide step-by-step instructions on how to get started with Pagecall. We’ll cover everything from setting up your account and creating your first project, to creating a meeting room and inviting users to join using our APIs.

Creating a Workspace

To begin using Pagecall, the first step you need to do is to create a workspace. A workspace is a container that holds all of resources related to meetings, recordings and invited members.

To create a workspace, log in to your Pagecall account and navigate to the console page.

Click the “Create Workspace” button and follow the prompts to set up your new workspace. Once your workspace is created, you’ll be able to create new meetings within it.

Generating an API Key

Before you can start using Pagecall’s APIs, you’ll need to generate an API key. An API key is a unique identifier that allows you to authenticate with Pagecall’s servers and access the API resources.

To generate an API key, log in to your Pagecall account and navigate to the workspace setting page. In API Key section, Click the Generate button to create your new API key. Once you’ve generated your key, you’ll be able to use it to authenticate the Pagecall API.

Creating a meeting room

Once you’ve created your workspace and generated your API key, you can start creating meeting rooms. A meeting room is a virtual space where you can host real-time audio, video, and whiteboard interactions with other users.

To create a meeting room, you’ll need to make a POST request to the Pagecall API with the appropriate parameters. You can use any HTTP client library to make the request, such as Axios or the built-in fetch API.

Here’s an example code snippet for creating a meeting room using JavaScript and Axios:

const axios = require("axios");

const apiKey = "YOUR_API_KEY";

axios
  .post(
    "https://api.pagecall.com/v1/rooms",
    {
      name: "My Meeting Room",
      type: "open", // Could be one of 'open', 'public' or 'private'
    },
    { headers: { Authorization: `Bearer ${apiKey}` } }
  )
  .then((response) => {
    const { room } = response.data;
    // Meeting room created with ID: 642bc31a0b4c622bea46c82f
    console.log(`Meeting room created with ID:`, room.id);
  })
  .catch((error) => {
    console.error("Error creating meeting room:", error);
  });

To learn more about this API, please refer to the API Reference.

Redirecting clients to the meeting room

Once you’ve created a meeting room, you’ll need to redirect clients to the room’s URL so they can join the meeting. The meeting URL is generated by the Pagecall API and returned as part of the response when you create the meeting room.

To redirect clients to the meeting room, simply construct a URL using the meeting ID and the Pagecall domain, like this:

return redirect(302, `https://app.pagecall.com/meet?room_id=${room.id}`);

The URL will remain valid until you remove the room.

Further more

Congratulations! You’ve learned the basics of how to interact with Pagecall using our APIs. From here, you can explore the API documentation to learn more about the available resources and how to use them.

If you have any questions or need help getting started, please don’t hesitate to contact our support team. We’re always here to help!