ayuLiao / onlyfans-dynamic-rules

Constants for signing OnlyFans API requests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

If you use this, give this repo a star to keep it live

This free version is updated every hour-ish.

(If your use case requires the latest signing values, check https://ofapi.xyz)


Direct link: https://raw.githubusercontent.com/deviint/onlyfans-dynamic-rules/main/dynamicRules.json

Usage (JavaScript)

const time = +new Date()
const url = new URL(fullUrl)
const msg = [
    dynamicRules["static_param"],
    time,
    url.pathname + url.search,
    userId
].join("\n")
const shaHash = sha1(msg);
const hashAscii = Buffer.from(shaHash, 'ascii');

const checksum = dynamicRules["checksum_indexes"].reduce((result, value) => result + hashAscii[value], 0) + dynamicRules["checksum_constant"];
const sign = [dynamicRules["start"], shaHash, Math.abs(checksum).toString(16), dynamicRules["end"]].join(":")
// output: {sign, time}

For OnlyFans API inquiries, OnlyFans consulting, OnlyFans product/service advice DM me @onlyfansrich @onlyfansrich or email deviint@proton.me . I have extensive knowledge of all things related to OnlyFans' inner workings and API.

About

Constants for signing OnlyFans API requests


Languages

Language:JavaScript 54.8%Language:Python 45.2%