README
Clubhouse API
Clubhouse API client for TypeScript, Node.js, and Deno.
Features
- TypeScript - Simple, clean TS/JS wrapper for the Clubhouse API.
- Rate Limits - Built-in throttling for Clubhouse rate limits.
- Robust - Built-in retry logic with exponential falloff via got.
- Crawler - Comes with a built-in crawler for the Clubhouse social graph.
- ️️Persistent - Crawler comes with optional neo4j support.
Install
npm install --save clubhouse-client
# or
yarn add clubhouse-client
Usage
import { ClubhouseClient } from 'clubhouse-client'
const exampleUserId = '2481724'
const examplePhoneNumber = '+15555555555'
const exampleVerificationCode = '5555'
const clubhouse = new ClubhouseClient()
await clubhouse.startPhoneNumberAuth(examplePhoneNumber)
// NOTE: manually get the SMS verification code
await clubhouse.completePhoneNumberAuth(
examplePhoneNumber,
exampleVerificationCode
)
// you should now be authenticated with a userId and authToken
// you can alternatively auth directly via the ClubhouseClient constructor
const me = await clubhouse.getMe()
const profile = await clubhouse.getProfile(exampleUserId)
// get a single page of users that our example user is following
const following = await clubhouse.getFollowing(exampleUserId)
// get a single page of users who are following our example user
const followers = await clubhouse.getFollowers(exampleUserId)
// get all of the users that our example user is following
// (this will attempt to fetch all of the page results)
const allFollowing = await clubhouse.getAllFollowing(exampleUserId)
// get all of the users following our example user
// (this will attempt to fetch all of the page results)
const allFollowers = await clubhouse.getAllFollowers(exampleUserId)
See example.js for a basic Node.js example that uses a previously authenticated user.
Disclaimer
This code is intended purely for educational purposes. It may go against the Clubhouse ToS, so use at your own discretion. We recommend against using this API / crawler with your personal Clubhouse account — you may get banned.
Happy Hacking 🙃
License
MIT © Travis Fischer.
Support my OSS work by following me on twitter