পণ্যের অংশে চলে যান
LCPanelলাইসেন্স সেন্টার প্যানেল
QCMS Quran CMS টি অধ্যায়

Quran CMS ডকুমেন্টেশন

API ও ডেভেলপার পাতা

আপনার সাইটের উপর অন্য কেউ অ্যাপ বা ওয়েবসাইট বানাতে পারবে—কী, কে কী চাইতে পারবে, সীমা, আর তাদের অ্যাপ থেকে লগইন।

সাইট সচল রাখা হালনাগাদ ৬ নভে ২০২৬ ১৭ / ২৮

Everything your site knows — the Quran with its translations and tafsir, the recitations, the prayer times, the search, the notices and the member accounts — can be read and used by somebody else's app or website. It is plain JSON, it needs no library, and a key takes a minute.

Two pages run it: System → API & developers in the admin panel, and /developers on the site itself.

Who needs a key

Who is callingA key?
Your own pages (the Quran reader, a comment, a like)No. They carry a session and a token, as they always did
Somebody else's website or app, readingNot unless you ask for one (below)
Somebody else's app, signing a member in or touching their dataYes, with the Accounts permission

So switching the developer API on changes nothing about how your own site works. It only opens a door.

System → API & developers

How the API behaves

  • Answer calls from other sites (CORS) — off, only pages of your own site may call the API from a browser.
  • The developer API is open — the keys, the /developers page and sign-in from somebody else's app. Switched off, every key stops working at once.
  • Members may make their own keys — off, only you make keys, on this page.
  • Even plain reading needs a key — on, every call from outside must carry a key, including the Quran and the prayer times. Leave it off unless the API is being abused.
  • Calls a minute a new key gets — each key can be given its own below. 60 is a fair start.
  • Keys one member may hold — 3 by default.
  • A word on the developers page — your own sentence at the top of /developers.

Keys lists every key: what it is for, who owns it, what it may ask for, how many calls it has made today and in all, when it was last used. Each one can be changed, suspended (it stops at once, and starts again when you let it) or removed (everything using it stops, and cannot be brought back).

A new key asks for a name, an address, what it may ask for, a limit by the minute, and — if it is for a member — their number. Save and the secret is shown once: it is kept hashed, so nobody, not even you, can read it again. A lost secret is replaced, not recovered.

Calls on the right draws the last fourteen days.

/developers

The page anybody can read. It carries:

  • every endpoint, in three groups — the Quran, prayer and the mosque, members;
  • three worked examples: from a server, from a page in a browser, and as a signed-in member;
  • and, for a signed-in member, their own apps: make one, change its name or what it may ask for, take a new key, or remove it.

Put it in your footer links (Appearance → Footer) so developers can find it: Developers | developers.

What a call looks like

The key travels in a header:

curl -H "X-API-Key: qc_…" https://your-site/api/surah/1?tr=bn-taisirul

A page in a browser may use ?key=… instead, because a <script> cannot set a header. Give such a key the hosts it may be used from, so a key picked out of your page's source is useless anywhere else.

Every answer is JSON with ok. An error carries ok: false and a message you can show. Add ?lang=bn or ?lang=en for the language of the words. Over the limit, the answer is 429 with Retry-After: 60.

Signing a member in from somebody else's app

With the Accounts permission:

POST /api/auth/register   {name, email, password}  -> a token
POST /api/auth/login      {email, password}        -> a token
GET  /api/auth/me         (Authorization: Bearer …)
POST /api/auth/logout

Sign-up goes the same road as the form on your site: the same rules, the same welcome e-mail, and the same wait for approval if you ask new accounts to be approved. The token lasts ninety days; signing out ends it at once. The member's bookmarks and reading place are the same in the app and on the website.

A secret never travels in a call. It is what proves a key is yours when you replace it.

Questions

Can somebody take my content this way? They can read what your website already shows to anybody — the same pages, in a tidier shape. If that worries you, switch on Even plain reading needs a key, and give each key a limit and a list of hosts.

Do keys cost anything? Not on your side. It is your site; charge for them or not as you please.

What happens when I remove a key? Every call using it stops at once, and every member who signed in through it is signed out.

এটি কি কাজে লেগেছে?
এই অধ্যায়টি শেয়ার করুন