Skip to main content
Version: Node.js

Quickstart

This guide will help you get started with the SIM Swap API. You will learn how to initialize the SDK, send a SIM Swap request, and handle the response.

Prerequisites

Before you begin, you need to have the following:

Step 1: Get your API Credentials

To get your API Credentials, you can go to the SIM Swap Product Page and click on "Manage on Provider" to access the service dashboard. For a full guide on how to get your credentials, you can refer to the Registration guide.

Step 2: Create a new project

Create a new folder and enter the folder from a terminal.

mkdir sim-swap-test
cd sim-swap-test

Step 3: Initialize the SDK

npm init -y
npm install glide-sdk

Step 4: Send a SIM Swap request

Create a new file index.ts and initialize the SDK with your API credentials.

index.ts
import { GlideClient } from "glide-sdk";

async function main() {
const glide = new GlideClient({
clientId: "<YOUR_CLIENT_ID>",
clientSecret: "<YOUR_CLIENT_SECRET>",
});

const simSwapClient = await glide.simSwap.forUser({
phoneNumber: "+555123456789",
})

const simSwapRes = await simSwapClient.check()
console.log(simSwapRes)
}

main().catch(console.error);

To executre this you can the following from a terminal in the directory of your code:

npx tsx index.ts