পণ্যের অংশে চলে যান
LCPanelলাইসেন্স সেন্টার প্যানেল

ডেভেলপার API

পাবলিক REST API ও ডেভেলপার পোর্টাল: PKCE ও রিফ্রেশ টোকেনসহ OAuth 2.0, অন্য সাইটে এই সাইট দিয়ে লগইনের জন্য OpenID Connect, স্কোপসহ ব্যক্তিগত ও অ্যাপ টোকেন, রেট লিমিট, CORS ও IP তালিকা, সাইন করা ওয়েবহুক, oEmbed ও পোস্ট এমবেড, মেম্বারদের পাবলিক ফিড এবং বিশ্বস্ত নিজস্ব অ্যাপের জন্য রেজিস্ট্রেশন ও লগইন।

প্লাগিনগুলো হালনাগাদ ৬ নভে ২০২৬ ৪০ / ৪০

The Developer API plugin opens your site to other programmers. Members create apps, other sites show your public posts, mobile and web apps read and post for the members who allow them, and another site (another MyMeetBook too) can offer a "Login with your site" button. Everything is standard: REST + JSON under /api/v1, OAuth 2.0 with PKCE, OpenID Connect, oEmbed, RSS and JSON Feed.

The site's own JavaScript keeps using its internal /api/<file>/<action> addresses; the plugin does not change them.

Turning it on

  1. Admin → Plugins → Developer API → Activate. The tables are made on activation.
  2. Admin → Plugin pages → Developer API sets who may create apps (every member, verified members, Pro members or admins only), the default limits, how long tokens live and the words of the documentation page.
  3. Packages (Admin → Packages) get two features: Create API apps (on/off) and API requests a day (0 = the default).

On Apache the site's .htaccess passes the Authorization header to PHP and lets /embed/post/<id> be shown inside other sites' frames. On nginx add fastcgi_param HTTP_AUTHORIZATION $http_authorization; and do not send X-Frame-Options for /embed/post/.

For developers: the portal

  • /developers - the documentation, drawn from the list of endpoints: every endpoint with its method, scopes, parameters, a curl and a JavaScript example and an example answer, plus authentication, scopes, errors, rate limits, pagination, webhooks and embeds. Endpoints that plugins add (Pages, Groups, Messenger) appear by themselves while those plugins are on.
  • /developers/apps - a member's apps and personal access tokens. An app has a name, description, logo, website, redirect addresses and a type: web (a site with a server), single-page (browser JavaScript), mobile or server (no members). The client secret is shown once, right after creating the app or making a new one; the site keeps only its fingerprint. Each app page has the client id, "New secret", the webhook address and events, the allowed origins (CORS), an IP allow list and a chart of its requests in the last 14 days.
  • Personal access tokens act as the member for their own scripts: a name, only the scopes needed, and an end date (7 to 365 days). Shown once.

Scopes

ScopeAllows
openidwho the member is (id_token)
profilename, username, picture, profile address
emailthe e-mail address
readthe feed and the posts, comments, pages and groups the member can see
writepost, comment and react
messagesread and send messages (only while the Messenger plugin is on)
friendsthe friends list

Every answer follows the site's privacy exactly: friends-only posts, private profiles, blocked members and secret groups are "not found" to a token that may not see them.

Signing members in (OAuth 2.0 + PKCE)

Discoveryhttps://your-site/.well-known/openid-configuration
Authorizehttps://your-site/oauth/authorize
Tokenhttps://your-site/oauth/token
Userinfohttps://your-site/oauth/userinfo
Revokehttps://your-site/oauth/revoke
Keys (RS256)https://your-site/oauth/jwks

The member sees a consent card in the site's own design ("Photo Sync wants to use your account" and the list of what it may do). A yes is remembered per app. Codes live 5 minutes and work once; access tokens live 1 hour; refresh tokens 30 days and work once each (a refresh token used twice ends the whole sign-in). Single-page and mobile apps must use PKCE and have no secret. Server apps can take a token for themselves with grant_type=client_credentials (read scope only; they see what a visitor sees).

"Login with" this site from another MyMeetBook

  1. On this site: create an app of type web with the redirect address https://OTHER-SITE/auth/custom1/callback (custom2 / custom3 for the other slots).
  2. On the other site: Admin → Plugin pages → Social Login → a Custom provider slot. Authorization address https://your-site/oauth/authorize, token address https://your-site/oauth/token, profile address https://your-site/oauth/userinfo, scope openid email profile, the client id and the secret. The field names can stay as they are (sub, name, email, picture).
  3. Switch the slot on. The other site shows a "Login with" button for your site.

Any OpenID Connect library (WordPress, Laravel Socialite, NextAuth, Android AppAuth) works the same way with the discovery address.

Endpoints

All under https://your-site/api/v1/ with Authorization: Bearer <token>.

Method and addressScopeWhat it does
GET meprofile (+ email)the token's member
GET users/{id or username}reada public profile
GET users/{id}/postsreadtimeline posts the token may see
GET me/friendsfriendsthe friends list
GET feedreadthe member's home feed, with cursors
POST postswritea text or link post (the site's limits and approval apply)
GET posts/{id} / DELETE posts/{id}read / writeone post / delete your own
GET / POST posts/{id}/commentsread / writecomments
POST / DELETE posts/{id}/reactionswritereact / take it back
GET search?q=readmembers, posts and hashtags
GET pages/{id}, GET groups/{id}readfrom the Pages and Groups plugins
GET messages/conversations[/{id}], POST messagesmessagesfrom the Messenger plugin
POST auth/login, POST auth/registertrusted appssign-in and sign-up for your own first-party apps

Lists answer data and paging.next_cursor; pass it back as ?cursor=. Errors answer {"error": {"code", "message", "status"}} with the usual HTTP status (401 invalid_token, 403 insufficient_scope, 404 not_found, 422 refused, 429 rate_limited ...).

Trusted apps

Only an admin can mark an app as trusted (Plugin pages → API apps → Trust). Trusted apps may call auth/login (e-mail or username + password; answers a token pair; an account with two-step sign-in is sent to the normal sign-in) and auth/register, which follows the site's own rules: registration open, invitations, captcha, e-mail confirmation and approval. An account that has to wait answers 202 with "status": "pending" and no tokens. Use this only for your own apps.

Webhooks

An app picks events - post.created, comment.created (posts and comments of members who connected the app, and the owner's own) and user.registered (trusted apps only). Each delivery is a JSON POST with X-MMB-Event, X-MMB-Delivery, X-MMB-Timestamp and X-MMB-Signature: sha256=HMAC(timestamp + "." + body, webhook secret). Anything but a 2xx answer is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours and 12 hours by the cron job Developer API: send webhooks that are due. Webhooks cannot point at private or local addresses unless the admin allows it.

Embeds and feeds

  • Every public post has Embed this post in its menu: a page with the iframe code. /embed/post/<id> is the frame itself.
  • oEmbed: https://your-site/oembed?url=<post address> - WordPress and most CMSs only need the post address. Post pages carry the oEmbed discovery link.
  • Public feeds: a member who switches on Let other sites show my public posts (Settings → Privacy) gets https://your-site/feeds/<username>.rss and .json (JSON Feed 1.1), public posts only.

Limits and safety

  • Per app: requests a minute and a day (defaults 120 / 20,000; the admin can set other numbers per app). Per token: requests a minute (60). Per member: requests a day over all tokens (5,000, or the package's number). Over a limit: 429 with Retry-After.
  • CORS per app (allowed origins), IP allow list for server apps.
  • Secrets, codes and tokens are stored only as SHA-256 fingerprints; the id_token key is made on the server and kept in cache/developer-api/. The audit log keeps who called which address, the answer and the time - never a token, a secret or a query string.
  • Members see and revoke every app under Settings → Apps and sites. Admins can switch an app off, revoke an app's tokens, turn API use off for a member, or Revoke all tokens in an emergency.

Admin pages

  • Developer API - on/off, who may create apps, limits, token lives, docs page title/introduction/logo, members who may not use the API, Revoke all.
  • API apps - every app with its owner, members connected, requests today and a 14-day chart, a 30-day chart of all apps, limits per app, Trust, Switch off/on, Revoke tokens, Delete.
  • Webhooks log - every delivery with its state, tries and last answer; "Try now".
  • API audit log - the last calls, filtered by app or HTTP status.
এটি কি কাজে লেগেছে?
এই অধ্যায়টি শেয়ার করুন