# ifunny.ts

> An iFunny API wrapper written in TypeScript

Latest version **0.10.0** (published 2026-03-03) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install ifunny.ts
pnpm add ifunny.ts
yarn add ifunny.ts
bun add ifunny.ts
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.10.0 |
| Published | 2026-03-03 |
| First published | 2022-07-29 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 6 |
| Unpacked size | 415.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | makeshiftartist |

## Links

- npm: https://www.npmjs.com/package/ifunny.ts
- Repository: https://github.com/MakeShiftArtist/iFunny.ts
- Homepage: https://github.com/MakeShiftArtist/iFunny.ts#readme
- Issues: https://github.com/MakeShiftArtist/iFunny.ts/issues
- npm.io page: https://npm.io/package/ifunny.ts

## Dependencies (6)

- [axios](https://npm.io/package/axios.md) ^1.13.6
- [form-data](https://npm.io/package/form-data.md) ^4.0.5
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^5.0.4
- [node-ts-cache](https://npm.io/package/node-ts-cache.md) ^4.4.0
- [@ifunny/ifunny-api-types](https://npm.io/package/@ifunny/ifunny-api-types.md) ^1.0.4
- [node-ts-cache-storage-memory](https://npm.io/package/node-ts-cache-storage-memory.md) ^4.4.0

## Recent versions

- 0.10.0 (latest) — 2026-03-03
- 0.9.0 — 2025-12-29
- 0.8.0 — 2025-04-04
- 0.7.1 — 2023-11-17
- 0.7.0 — 2023-11-01
- 0.6.5 — 2023-04-14
- 0.6.4 — 2023-04-13
- 0.6.3 — 2023-04-13
- 0.6.2 — 2023-04-13
- 0.6.1 — 2023-04-13
- 0.6.0 — 2023-04-13
- 0.5.1 — 2022-11-26
- 0.5.0 — 2022-11-13
- 0.4.0 — 2022-09-11
- 0.3.4 — 2022-09-05
- … 6 more at https://npm.io/package/ifunny.ts/versions

## README

# iFunny.ts

![License](https://img.shields.io/npm/l/ifunny.ts)
![npm](https://img.shields.io/npm/v/ifunny.ts)

The go-to iFunny API wrapper library written in TypeScript! Reverse engineered
from the ground up, taking heavy inspiration from discord.js!

Full documentation can be found
[here](https://makeshiftartist.github.io/iFunny.ts/)

## Authors

- [@MakeShiftArtist](https://www.github.com/MakeShiftArtist)

## Quick Start Guide

While the iFunny client is able to do quite a bit without logging in, to use the
full feature set you'll want to get authorization.

There are 2 ways to get a basic token and a bearer token

1. Use a packet sniffer while already logged in to iFunny.
2. Use the iFunny.ts client to login and generate new basic and bearer tokens

I won't be walking you through the first option as that is a lengthy process of
setting up and configuring.

Instead, I'll walk you through using the custom Client.

If you don't want to write any code, you can clone the repo, and run the "login"
script

> [!IMPORTANT]
> The login script that comes with this is likely to be replaced by
> [ifunny-auth](https://github.com/Open-iFunny/ifunny-auth) in the future, and
> we recommend using that instead

```sh
git clone https://github.com/MakeShiftArtist/iFunny.ts.git

cd iFunny.ts

deno run -A ./scripts/login.ts
```

This will prompt you to enter your username and password

```
Enter your iFunny username (email address): your@email.com
Enter your iFunny password: *********
Re-enter your iFunny password: *********
Priming Basic Token...
Basic Primed! RTJCM0FENzlCMkNCNDgyOEFBNTc2QjIyNEEyREQ4MDFfTXNPSUozOVEyODpmOTMyMjE3N2ZhYTM1MTVjMjZlN2M1MjY5NTcyYzY4M2VmYTk5YzZl
Replace `const BASIC = null` with your basic token
Logging in...
Captcha error!
Human verification is required: https://ifunny.co/captcha/c272fd81558bcf.24861254
Open the link above in a browser, solve the captcha, and run the script again.
```

Priming the basic token takes 15 seconds to complete. The long string of
characters after "Basic Primed!" is your Basic Token. Save that and set it for
the `BASIC` variable in `./login.ts` Once that's done, solve the captcha and run
the script again.

```sh
npm run login
```

After entering your credentials once more, you should get sucessfully logged in

```
Enter your iFunny username (email address): your@email.com
Enter your iFunny password: *********
Re-enter your iFunny password: *********
Logging in...
Logged in successfully!
Basic Token: RTJCM0FENzlCMkNCNDgyOEFBNTc2QjIyNEEyREQ4MDFfTXNPSUozOVEyODpmOTMyMjE3N2ZhYTM1MTVjMjZlN2M1MjY5NTcyYzY4M2VmYTk5YzZl
Bearer Token: 0d8527df847cb15b1c808422a7b150951fe7452bdb0a04d0c2bf920d2a302466
```

Once you see these, you'll want to save these somewhere secure. NEVER SHARE
THESE WITH ANYONE. A bearer token grants full control over your account.

## Example Usage

Install iFunny.ts

```sh
npm install ifunny.ts
```

```ts
import iFunnyClient from "ifunny.ts";

const client = new iFunnyClient({
    basic: process.env.BASIC,
    bearer: process.env.BEARER,
});

async function main() {
    const user = client.users.byNick("iFunnyChef");
    if (user) {
        console.log(user.id);
        await user.suscribe();
    }
}
```

## Links

- [Documentation](https://makeshiftartist.github.io/iFunny.ts/)
- [npm](https://www.npmjs.com/package/ifunny.ts)
- [GitHub](https://github.com/ifunny-co/iFunny.ts)
- [iFunny API Discord Server](https://discord.gg/Wvkycj5xGW)

---
_Source: https://npm.io/package/ifunny.ts · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
