For developers
The Meetowt API
Read your company's staff list, contacts, tasks and meetings from your own tools, and add or change contacts and tasks. An administrator makes a key; the tool sends it; that is the whole of the set-up.
The API is an extra. It is switched on for a company by Meetowt, on request — write to help@meetowt.com from your administrator's address. Until it is on, your administrators see no key screen here and no key answers.
1. The short version
Your workspace is at its own address, for example acme.meetowt.com. Every route below is under https://<your workspace>/api/v1, answers JSON, and is opened by a key in the Authorization header.
curl https://acme.meetowt.com/api/v1/me \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE"
{ "data": {
"key": { "name": "Accounting sync", "prefix": "mwk_a1B2",
"scopes": ["people:read", "contacts:read"],
"createdAt": "2026-10-11T09:14:00.000Z", "expiresAt": null },
"company": { "name": "Acme Ltd" } } }
2. Making a key
An administrator opens Admin → Company settings → API keys, presses Make a key, gives it a name, ticks what it may do and chooses how long it lasts (30 days, 90 days, a year, or until revoked). The key is shown once, with a Copy button. Meetowt keeps no copy it could show you again — only a one-way fingerprint — so a lost key is revoked and a new one made.
- A key looks like
mwk_followed by 40 letters and digits. - A company can have 25 live keys at once. Make one per tool, so one can be revoked without stopping the rest.
- The name appears in your company's record of changes beside everything the key writes, as
api:<name>. Every other administrator is told, in Meetowt, when a key is made or revoked. - A key acts for the whole company, not for any one person. It is not tied to a colleague's account, so it keeps working when people join and leave — and whoever holds it can do what its scopes say, from anywhere. Keep it out of chat, email and code other people can read.
- Revoking is immediate: the very next request with the key is refused.
3. Authentication
Send Authorization: Bearer mwk_… on every request. Nothing else opens the API: a browser that is signed in to Meetowt gets the same answer as a stranger, and a key does not open anything outside /api/v1.
The company is the one whose address you asked. A key made by another company is not a key here.
Scopes
Each key is allowed some of these, and nothing else exists — no mail, chat, files, employment records or admin.
| Scope | Lets the key |
|---|---|
people:read | Read the staff list. |
contacts:read | Read the company's address book of people outside it. |
contacts:write | Add, change and remove contacts. |
tasks:read | Read every task in the company. |
tasks:write | Give a named person a task, and change a task's status, priority, due date and title. |
calendar:read | Read the meetings the key's maker is in. |
verify:send | Send a one-time code by WhatsApp from the company's own number, and check the code the person types (Meetowt Verify). Opens no company data. |
4. Conventions
- JSON in, JSON out. Send
Content-Type: application/jsonwith a body. A single thing comes back as{ "data": { … } }, a list as{ "data": [ … ], "nextCursor": "…" }. An error is{ "error": "a sentence" }. - Nothing is cached. Every answer says
Cache-Control: no-store. - Times are ISO 8601. A calendar day is
YYYY-MM-DD. People are named by their username. - Paging. A list takes
?limit=(1 to 100, default 50) and?cursor=. WhennextCursoris notnull, pass it back ascursorfor the next page. A cursor is opaque: take it as it comes, and use it with the same list and the same filters. Alimitoutside 1–100, or a cursor that is not one the list gave, is a 400 — never quietly changed. - A body is read strictly. A field the API does not know is refused by name (
unknown field "dueon") rather than ignored, so a misspelling cannot silently lose a value.
5. Routes
GET /api/v1/me
Who this key is. Any valid key may ask; it needs no scope.
GET /api/v1/people — people:read
The staff list, by username: what the company's own directory shows a colleague. No personal address, staff number, phone number or role. People who have left are not listed.
curl "https://acme.meetowt.com/api/v1/people?limit=2" \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE"
{ "data": [
{ "username": "ann", "name": "Ann Hart", "email": "ann.hart@acme.com",
"title": "Buyer", "departments": ["Sales"], "manager": "mona" },
{ "username": "bob", "name": "Bob Samir", "email": "bob@acme.meetowt.net",
"title": null, "departments": [], "manager": null } ],
"nextCursor": "WyJwZW9wbGUiLCJib2IiXQ.4f9c1d2a8b3e" }
email is the address the person is known by at the company. manager is a username, or null at the top.
GET /api/v1/contacts — contacts:read
The company's address book of people outside it — customers, suppliers, partners — by id. Optional ?q= (searches name, address and organisation) and ?tag=.
curl "https://acme.meetowt.com/api/v1/contacts?tag=supplier&limit=1" \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE"
{ "data": [
{ "id": 12, "name": "Mona Hassan", "email": "mona@nile.example",
"phone": "+20 100 000 0000", "organisation": "Nile Trading", "title": "Buyer",
"notes": null, "tags": ["supplier"],
"createdBy": "api:Accounting sync", "createdAt": "2026-10-11T09:20:00.000Z",
"updatedBy": "api:Accounting sync", "updatedAt": "2026-10-11T09:20:00.000Z" } ],
"nextCursor": null }
GET /api/v1/contacts/{id} — contacts:read
One contact, in the same shape, as { "data": { … } }. An id nobody made is a 404.
POST /api/v1/contacts — contacts:write
Adds a contact. Only name is required; the rest are optional: email, phone, organisation, title, notes and tags (single words). The rules are the Contacts screen's: one contact per email address, up to 20,000 a company. Answers 201 with the contact.
curl -X POST https://acme.meetowt.com/api/v1/contacts \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"name":"Mona Hassan","email":"mona@nile.example","tags":["supplier"]}'
{ "data": { "id": 12, "name": "Mona Hassan", "email": "mona@nile.example", … } }
A second contact with an address the company already has is a 409 that names the first: Mona Hassan already has that email address — open that contact instead of adding another.
PATCH /api/v1/contacts/{id} — contacts:write
Changes only the fields you send and keeps the rest. Send at least one. An empty string clears a field.
curl -X PATCH https://acme.meetowt.com/api/v1/contacts/12 \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"title":"Head of buying"}'
DELETE /api/v1/contacts/{id} — contacts:write
Removes the contact for good. Answers { "data": { "id": 12, "deleted": true } }.
GET /api/v1/tasks — tasks:read
Every task of every person the company has — a key acts for the company, so it is not limited to one person's reporting line. By id. Optional ?status= (todo, doing or done) and ?assignee= (a username).
curl "https://acme.meetowt.com/api/v1/tasks?status=doing" \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE"
{ "data": [
{ "id": 31, "title": "Send the invoice", "detail": "Before Friday.",
"status": "doing", "priority": "high", "assignee": "ann",
"assignedBy": "api:Accounting sync", "dueOn": "2026-10-16",
"tags": [], "steps": [{ "title": "Check the total", "done": false }],
"createdAt": "2026-10-11T09:30:00.000Z",
"startedAt": "2026-10-11T10:05:00.000Z", "finishedAt": null } ],
"nextCursor": null }
POST /api/v1/tasks — tasks:write
Gives a named person a task. assignee (a username the company has) and title (2 to 200 characters) are required; detail, dueOn (YYYY-MM-DD) and priority (low, normal, high or urgent) are optional. The task shows as given by api:<your key's name>, and the person is told as they would be of any task. Answers 201.
curl -X POST https://acme.meetowt.com/api/v1/tasks \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"assignee":"ann","title":"Send the invoice","dueOn":"2026-10-16","priority":"high"}'
A username the company does not have is a 404: there is nobody at this company with that username.
PATCH /api/v1/tasks/{id} — tasks:write
Changes a task's status, priority, dueOn (or null to clear it) or title — and nothing else; there is no way to reassign or delete a task through the API. Send at least one field. Finishing a repeating task still makes its next one.
curl -X PATCH https://acme.meetowt.com/api/v1/tasks/31 \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"status":"done"}'
GET /api/v1/calendar/events — calendar:read
The meetings the key's maker is in, between two days. from and to are both required and at most 31 days apart.
Only meetings. A calendar entry that only one person's diary holds — an appointment, a day blocked out — is private to them and is never sent. Neither is a cancelled meeting, nor any meeting's description.
curl "https://acme.meetowt.com/api/v1/calendar/events?from=2026-10-12&to=2026-10-18" \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE"
{ "data": [
{ "id": "ann!4f2c@meetowt", "title": "Budget review",
"start": "2026-10-12T09:00", "end": "2026-10-12T10:00",
"timeZone": "Africa/Cairo",
"startUtc": "2026-10-12T07:00:00.000Z", "endUtc": "2026-10-12T08:00:00.000Z",
"allDay": false, "organizer": "ann", "attendees": ["ann", "bob"] } ],
"nextCursor": null }
start and end are the wall-clock time in timeZone — what the people in the meeting see. startUtc and endUtc are the same moments in UTC (or null if the zone is not one we can convert).
6. Errors
| Status | What it means |
|---|---|
| 400 | The request was not understood: a field that does not exist, a value that is not allowed, a limit outside 1–100, a cursor that is not one the list gave. The sentence says which. |
| 401 | {"error":"invalid or missing API key"} — always these words, whatever was wrong: no key, a malformed one, one nobody made, a revoked one, an expired one, or one from another company. We do not say which, so that nobody can use the answer to find out. |
| 403 | The key is real but is not allowed to do this. The sentence names the scope it needs. |
| 404 | The thing is not there, or the company does not have the API switched on. |
| 409 | It conflicts with what the company has: a contact whose email address is already taken, or the address book is full. |
| 423 | The company's workspace is on hold. The sentence says why. |
| 429 | Too many requests — see below. Retry-After: 60. |
| 503 | We could not check the request just now. Try again in a moment; the key is fine. |
7. Limits
- 600 requests a minute for each key, and 1,200 a minute for all of a company's keys together. The rest of that minute are 429.
- 30 wrong or missing keys a minute for each source. A source (an IPv6 address counts as its /64) that presents more is refused outright for the rest of the minute — the right key included, so that a guess cannot be checked. If your tool starts getting 429 after a typo in a key, fix the key and wait a minute.
- Bodies are small: contacts and tasks take up to a few tens of kilobytes. Lists are never longer than 100.
Whether Meetowt, and Verify's sending to Meta, are working right now is on the service status page.
8. Looking after a key
- Give every tool its own key and its own name, and tick only what it needs.
- Choose an expiry for anything that is not permanent.
- Keep it in the tool's secret store or environment, not in code or chat.
- If it may have leaked, revoke it in Admin → Company settings → API keys and make another. Look at the record of changes for what
api:<name>did.
9. Meetowt Verify: one-time codes by WhatsApp
Your program asks Meetowt to send a person a six-digit code on WhatsApp, from your company's own WhatsApp Business number, then asks whether the code the person typed is right. It is two calls, with the same key and the same rules as every other route here. The scope is verify:send, and it opens no company data at all.
Setting it up
- An administrator opens Admin → Verify and presses Connect your WhatsApp number.
- They paste four things from your own Meta developer account: the WhatsApp Business account id, the phone number id, a permanent access token and the app secret. The screen says where each one is in Meta. Meetowt checks them with Meta before it keeps anything, and keeps the token and the secret encrypted — they are never shown again.
- Meetowt makes the code message for English, Arabic and French through Meta's API. Meta approves each one (minutes, sometimes a day); the screen shows where each stands. A code can be sent in a language once its message is approved.
- Optionally, they set Meta's callback address and verify token (both shown on the screen), so the log can say delivered and read.
- They make a key: on the Verify screen itself (a live key,
mwk_live_…, or a test key,mwk_test_…), or in Company settings with verify:send ticked. Each key is shown once.
Test keys: your first code in five minutes
A test key (mwk_test_…) needs no WhatsApp number and never costs anything. Nothing it sends reaches Meta or anybody's phone: its code is always 000000, and the request moves through sent, delivered and read on its own, about two seconds a step, so your program sees every status it will see for real. Every answer carries "mode": "live" or "test". A company can send 1,000 test codes a day; live codes are not affected. A test key reads and checks only test requests, and a live key only live ones: the other kind's id is a 404, like an id nobody made. The Verify screen's first card makes a test key, sends a test code from the page with the exact request and answer shown, and gives you a sample in curl, Node.js, Python, PHP, C# and Java (all six are below).
Without a workspace
A developer or a software house that only needs codes can open a codes-only account at my.meetowt.com/developers, with a work email: no mail, no chat, no staff. It is the same Verify screen and the same three routes; its keys work at https://my.meetowt.com/api/v1/verify/…. Free during early access, with no daily limit.
Meta, not Meetowt, charges you for each WhatsApp message, on your own Meta account. To send beyond Meta's starting limits, verify your business with Meta.
POST /api/v1/verify/send — verify:send
Asks for a code to be sent. The answer is the request itself, not wrapped in data — the Verify routes answer exactly what is shown here.
curl -X POST https://acme.meetowt.com/api/v1/verify/send \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"to":"+201001234567","lang":"ar"}'
202 { "id": "vrf_Qm3xK8aT2wZr5LbN7cDp9sVe",
"channel": "whatsapp",
"expiresAt": "2026-11-20T18:25:00.000Z" }
tois the number in international form: a plus sign, then 8 to 15 digits.langisen(the default),arorfr.channelmay be left out;whatsappis the only one.- The code is six digits, valid for 10 minutes, with 5 tries. The answer is 202 because the message is sent a moment after: do not wait for it to arrive before showing your own screen.
- The same number again within 60 seconds returns the same request — nothing new is sent and nothing new is counted.
- A number of one country is accepted only if the company has switched that country on (Admin → Verify; Egypt, Saudi Arabia, the Emirates, Kuwait, Qatar, Bahrain and Oman at first). A number can be sent at most 5 codes an hour.
- There is no daily limit unless the company sets one: you send from your own number and Meta bills you directly. An administrator may set a daily limit as a brake on your own spending (counted from midnight UTC); past it the answer is a 429 that says so. The 5 codes an hour to one number stays whatever the limit: it protects the person's phone from being flooded and stops fraud that sends codes to numbers it is paid for.
- The number is kept only as a one-way fingerprint and its last three digits; the code only as a one-way fingerprint, so nobody at Meetowt can read either. Requests are deleted after 30 days.
POST /api/v1/verify/check — verify:send
Asks whether the code the person typed is the right one. Send code as text: a JSON number would lose a leading zero and is refused.
curl -X POST https://acme.meetowt.com/api/v1/verify/check \
-H "Authorization: Bearer mwk_YOUR_KEY_HERE" \
-H "Content-Type: application/json" \
-d '{"id":"vrf_Qm3xK8aT2wZr5LbN7cDp9sVe","code":"042042"}'
200 { "valid": true }
200 { "valid": false, "triesLeft": 3 }
410 { "error": "that code has expired or been used up — send a new one" }
A right code is accepted once: asking again with it is a 410, and so is a sixth try (even with the right code) and a code past its 10 minutes. A request that is not yours is a 404, exactly like one that was never made.
GET /api/v1/verify/{id} — verify:send
Where a request stands.
200 { "id": "vrf_Qm3xK8aT2wZr5LbN7cDp9sVe", "channel": "whatsapp",
"status": "delivered", "toLast3": "567",
"createdAt": "2026-11-20T18:15:00.000Z", "expiresAt": "2026-11-20T18:25:00.000Z",
"sentAt": "2026-11-20T18:15:01.000Z", "checked": false, "failReason": "" }
status is queued, sent, delivered, read, failed (with failReason in words), approved (the code was checked right) or expired. Delivered and read need Meta's callback to be set (above); without it a request stays at sent. The number itself is never answered, only its last three digits.
Delivery updates to your own system
Set an https address on the Verify screen and Meetowt POSTs to it each time a code is sent, delivered, read, failed, approved (checked right) or expired. The body never holds the number or the code:
POST https://hooks.example.com/meetowt
X-Meetowt-Event: delivered
X-Meetowt-Delivery: vhd_48213
X-Meetowt-Signature: t=1763662500,v1=5f2c…e9
{"id":"vrf_Qm3xK8aT2wZr5LbN7cDp9sVe","event":"delivered","status":"delivered",
"channel":"whatsapp","mode":"live","toLast3":"567","country":"EG","at":"2026-11-20T18:15:02.000Z"}
Check the signature before you believe a body. You are shown a signing secret once when you save the address (and again each time you make a new one). v1 is the hex HMAC-SHA256, under that secret, of the time t, a dot, and the raw body exactly as received. The time is inside what is signed, so a captured body cannot be sent again with a new time:
// Node.js
const [t, v1] = ["t", "v1"].map((k) => header.split(",").find((p) => p.startsWith(k + "="))?.slice(k.length + 1) ?? "");
const want = crypto.createHmac("sha256", SECRET).update(`${t}.${rawBody}`).digest("hex");
const ok = /^[0-9a-f]{64}$/.test(v1) && crypto.timingSafeEqual(Buffer.from(want, "hex"), Buffer.from(v1, "hex"))
&& Math.abs(Date.now() / 1000 - Number(t)) <= 300;
Answer any 2xx to say you have it. Anything else is tried again after 10 seconds, 1 minute, 5 minutes, 30 minutes, then 1, 2, 4, 6 and 8 hours (about a day), then given up; the screen shows each try and its last error, and Send a test event sends one now. The address must be https on the ordinary port and a public name: an address inside a private network is refused when you save it and again every time something is sent, and a redirect is not followed. An update may arrive more than once (a try your server took but answered too slowly is tried again), so de-duplicate: keep the id and event of what you have handled, or the X-Meetowt-Delivery header, which is the same for every try of one update, and ignore a repeat. Keep them at least as long as the five minutes a signature is good for. Updates are sent by Meetowt's own timer, so one can take up to a minute to arrive.
What the Verify routes answer
| Status | When |
|---|---|
| 202 | A code was asked for, or the same number's request of the last 60 seconds was returned. |
| 400 | A number that is not in international form, a language that is not en, ar or fr, a code that is not six digits as text, a field that does not exist. |
| 403 | The key does not have verify:send; or sending is switched off, or that number's country is not switched on, for the company. |
| 404 | No such request, it belongs to another company, or it is of the other mode (a test key asking about a live request, or back). |
| 409 | No WhatsApp number is connected yet, or Meta has not approved the message for that language yet. |
| 410 | The code has expired, been used up (5 tries) or already been accepted. |
| 429 | The company's own daily limit, if it set one, or 5 codes an hour to one number. The sentence says which. |
| 503 | Sending codes is not switched on on the server yet, or the request could not be checked just now. |
What it costs
Verify is free during early access, and test codes are never charged. Afterwards the plan is $0.015 for each successful check — when a code is checked right, not when it is sent — on top of what Meta charges you for the message, on your own account. Admin → Verify shows this month's successful checks and what they would cost.
More about Verify, in plain words: the Meetowt Verify page. To start without a workspace: sign up as a developer.
10. A key for each of your clients
A software house sends codes for the logins of many of its own customers. On the Verify screen, under Clients, give each one a name; it gets a number (shown beside it), and then:
- its own keys: when you make a key, choose who it is for. A client's key sends under that client, and reads and checks only that client's requests. Client A's key asking about client B's request is a 404, exactly like an id nobody made; so is the account's own key asking about a client's, and back.
- its own switch: a client that is switched off is refused with a 403 that says so. Switching the whole account off stops every client too.
- its own daily limit (none unless you set one), counted over that client's codes and alerts from midnight UTC, and its own countries (or the account's own list). The account's own limit still applies to all of them together, and 5 codes an hour to one number is counted across the whole account.
- its own delivery address, with its own signing secret. Without one, its updates go to the account's address. Every update says whose it was in
"client"(the client's number, ornullfor the account's own). - if it wants, its own WhatsApp number: the same four details from the client's own Meta developer account. Its codes then go out from it; without one, from the account's number. Its callback address for Meta is the account's with
?client=<its number>on the end, and only updates signed with that number's app secret move that number's requests. - its own usage and log: both can be cut to one client, and the usage CSV carries the client's number and name on every line (
day,client,client_name,mode,codes_sent,checked_right,cost_usd).
A client is never deleted, only switched off, so the log always says whose a code was.
11. WhatsApp alerts beyond codes
The same keys can send your company's own approved utility templates — an order update, a reminder, a receipt — from your connected number, through the same queue, statuses, delivery updates and log as a code, and under the same rules: 5 messages an hour to one number (counted together with codes), your own daily limit, your countries. Marketing is never sent: a template Meta filed under any category but utility is refused.
- Make the template in WhatsApp Manager and wait for Meta to approve it.
- On the Verify screen, under WhatsApp alerts, press Refresh from Meta. The list shows each template, its language, Meta's category and state, and how many blanks it has. Send a test sends one real message to a number you type.
POST /api/v1/whatsapp/send — verify:send
curl -X POST https://my.meetowt.com/api/v1/whatsapp/send \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+201001234567", "template": "order_shipped", "lang": "en_US", "params": ["A-1042", "Thursday"]}'
202 { "id": "wam_Hx2pR7cL9vQm4TnB8sKd3fZa", "channel": "whatsapp",
"template": "order_shipped", "lang": "en_US", "mode": "live" }
templateandlangare the name and language exactly as Meta shows them.paramsfills the body's blanks{{1}},{{2}}… in order: at most ten, each 1 to 1,024 characters, with no new lines, no tabs and never five spaces in a row. It must be exactly as many as the template has. A template that needs a picture, a document or a link filled in is not sent yet.- 403 for a template that is not utility, 409 for one that is not approved (or not refreshed yet), 400 for the wrong number of blanks.
- The words that fill the template wait for their one send encrypted and are deleted once Meta has answered; Meetowt keeps only the template's name. A test key never reaches Meta: the message walks sent, delivered, read on its own.
- Alerts are not priced yet and are free during early access. Meta bills you for each message, on your own account.
GET /api/v1/whatsapp/{id} — verify:send
200 { "id": "wam_Hx2pR7cL9vQm4TnB8sKd3fZa", "channel": "whatsapp", "status": "delivered",
"toLast3": "567", "createdAt": "2026-11-21T10:00:00.000Z", "sentAt": "2026-11-21T10:00:01.000Z",
"failReason": "", "mode": "live", "template": "order_shipped", "lang": "en_US" }
status is queued, sent, delivered, read or failed. A message's id is read here and a code's at /api/v1/verify/{id}: each is a 404 at the other. Delivery updates carry "kind": "message".
12. Checking a number
POST /api/v1/lookup — verify:send
curl -X POST https://my.meetowt.com/api/v1/lookup \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"number": "+201001234567"}'
200 { "valid": true, "possible": true, "e164": "+201001234567", "country": "EG", "callingCode": "20",
"type": "mobile", "national": "010 01234567", "international": "+20 10 01234567" }
Whether a number is a valid international number, its country and what kind of number it is: mobile, fixed_line, fixed_line_or_mobile, toll_free, premium_rate, shared_cost, voip, personal_number, pager, uan, voicemail or unknown. A number without its plus sign is answered as not valid, with the reason, rather than guessed at. Free.
Worked out on Meetowt's own server, from published numbering tables, and nothing is asked of anybody — not Meta, not a carrier. So it cannot know whether the number has WhatsApp, whether the line is switched on or still belongs to the same person, or which carrier holds it now. Valid means the digits fit that country's numbering plan, and nothing more. Nothing is kept, not even the number.
13. Code samples
Put your key where it says YOUR_KEY. A workspace's keys work at its own address as well as at https://my.meetowt.com. Every sample here is checked against the real routes, and the signature checks are run, before this page is published.
Send a code and check it
curl
# 1. Send a code
curl -X POST https://my.meetowt.com/api/v1/verify/send \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "+201001234567", "lang": "en"}'
# 2. Check what the person typed, with the id the send answered
curl -X POST https://my.meetowt.com/api/v1/verify/check \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "vrf_...", "code": "000000"}'
Node.js
// Node.js 18 or later: fetch is built in.
const KEY = "YOUR_KEY";
const BASE = "https://my.meetowt.com/api/v1/verify/";
async function call(path, body) {
const res = await fetch(BASE + path, {
method: "POST",
headers: { Authorization: "Bearer " + KEY, "Content-Type": "application/json" },
body,
});
return { status: res.status, body: await res.json() };
}
const sent = await call("send", JSON.stringify({"to": "+201001234567", "lang": "en"}));
// ...the person types the code they were sent...
const checked = await call("check", JSON.stringify({ id: sent.body.id, code: "000000" }));
console.log(checked.status === 200 && checked.body.valid);
Python
import requests
KEY = "YOUR_KEY"
BASE = "https://my.meetowt.com/api/v1/verify/"
HEADERS = {"Authorization": f"Bearer {KEY}"}
sent = requests.post(BASE + "send", json={"to": "+201001234567", "lang": "en"}, headers=HEADERS).json()
# ...the person types the code they were sent...
checked = requests.post(BASE + "check", json={"id": sent["id"], "code": "000000"}, headers=HEADERS)
print(checked.status_code == 200 and checked.json()["valid"])
PHP
<?php
const KEY = 'YOUR_KEY';
const BASE = 'https://my.meetowt.com/api/v1/verify/';
function call(string $path, string $body): array {
$ch = curl_init(BASE . $path);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $body,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . KEY, 'Content-Type: application/json'],
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return [$status, $answer];
}
[$status, $sent] = call('send', '{"to": "+201001234567", "lang": "en"}');
// ...the person types the code they were sent...
[$status, $checked] = call('check', json_encode(['id' => $sent['id'], 'code' => '000000']));
var_dump($status === 200 && $checked['valid']);
C#
// .NET 7 or later (C# 11 raw strings).
using System.Net.Http.Json;
using System.Text;
using System.Text.Json;
var http = new HttpClient { BaseAddress = new Uri("https://my.meetowt.com/api/v1/verify/") };
http.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_KEY");
var send = await http.PostAsync("send", new StringContent("""{"to": "+201001234567", "lang": "en"}""", Encoding.UTF8, "application/json"));
var sent = await send.Content.ReadFromJsonAsync<JsonElement>();
var id = sent.GetProperty("id").GetString();
// ...the person types the code they were sent...
var check = await http.PostAsJsonAsync("check", new { id, code = "000000" });
var checkedRight = check.IsSuccessStatusCode && (await check.Content.ReadFromJsonAsync<JsonElement>()).GetProperty("valid").GetBoolean();
Console.WriteLine(checkedRight);
Java
// Java 15 or later (text blocks); any JSON library reads the answers.
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class SendCode {
static final String KEY = "YOUR_KEY";
static final String BASE = "https://my.meetowt.com/api/v1/verify/";
static final HttpClient HTTP = HttpClient.newHttpClient();
static HttpResponse<String> call(String path, String body) throws Exception {
HttpRequest req = HttpRequest.newBuilder(URI.create(BASE + path))
.header("Authorization", "Bearer " + KEY)
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(body))
.build();
return HTTP.send(req, HttpResponse.BodyHandlers.ofString());
}
public static void main(String[] args) throws Exception {
HttpResponse<String> sent = call("send", """
{"to": "+201001234567", "lang": "en"}
""");
System.out.println(sent.body()); // {"id": "vrf_...", ...}: keep the id
// ...the person types the code they were sent...
String id = args[0];
HttpResponse<String> checked = call("check", "{\"id\": \"" + id + "\", \"code\": \"000000\"}");
System.out.println(checked.statusCode() + " " + checked.body());
}
}
Check a delivery update's signature
Use the raw body, exactly as it arrived, before anything parses it.
curl
# In a shell script, for trying it out: SECRET, HEADER (the X-Meetowt-Signature value) and BODY (the raw body) are yours.
# A shell cannot compare two strings in constant time, so it compares HMACs of both under a fresh random key: how long that takes says
# nothing about the signature. For a real server, use one of the other samples.
T=$(printf '%s' "$HEADER" | sed -n 's/.*t=\([0-9]\{1,12\}\).*/\1/p')
V1=$(printf '%s' "$HEADER" | sed -n 's/.*v1=\([0-9a-f]\{64\}\).*/\1/p')
[ -n "$T" ] && [ -n "$V1" ] || { echo "refuse it"; exit 1; }
WANT=$(printf '%s.%s' "$T" "$BODY" | openssl dgst -sha256 -hmac "$SECRET" -r | cut -d' ' -f1)
R=$(openssl rand -hex 32)
A=$(printf '%s' "$WANT" | openssl dgst -sha256 -hmac "$R" -r | cut -d' ' -f1)
B=$(printf '%s' "$V1" | openssl dgst -sha256 -hmac "$R" -r | cut -d' ' -f1)
AGE=$(( $(date +%s) - T ))
[ "$A" = "$B" ] && [ "$AGE" -le 300 ] && [ "$AGE" -ge -300 ] && echo "genuine" || echo "refuse it"
Node.js
const crypto = require("node:crypto");
// header: the X-Meetowt-Signature value; rawBody: the body exactly as it arrived (a string); secret: your signing secret.
function genuine(header, rawBody, secret, now = Math.floor(Date.now() / 1000)) {
const parts = Object.fromEntries(String(header).split(",").map((p) => p.trim().split("=", 2)));
if (!/^\d+$/.test(parts.t ?? "") || !/^[0-9a-f]{64}$/.test(parts.v1 ?? "")) return false;
if (Math.abs(now - Number(parts.t)) > 300) return false;
const want = crypto.createHmac("sha256", secret).update(parts.t + "." + rawBody).digest();
return crypto.timingSafeEqual(want, Buffer.from(parts.v1, "hex"));
}
Python
import hashlib, hmac, re, time
# header: the X-Meetowt-Signature value; raw_body: the body exactly as it arrived (str); secret: your signing secret.
# A malformed header is answered False, never an exception.
def genuine(header, raw_body, secret, now=None):
now = int(time.time()) if now is None else now
parts = dict(p.strip().split("=", 1) for p in str(header).split(",") if "=" in p)
t, v1 = parts.get("t", ""), parts.get("v1", "")
if not re.fullmatch(r"[0-9]{1,12}", t) or not re.fullmatch(r"[0-9a-f]{64}", v1) or abs(now - int(t)) > 300:
return False
want = hmac.new(secret.encode(), f"{t}.{raw_body}".encode(), hashlib.sha256).hexdigest()
return hmac.compare_digest(want, v1)
PHP
<?php
// $header: the X-Meetowt-Signature value; $rawBody: file_get_contents('php://input'); $secret: your signing secret.
function genuine(string $header, string $rawBody, string $secret): bool {
$parts = [];
foreach (explode(',', $header) as $p) {
[$k, $v] = array_pad(explode('=', trim($p), 2), 2, '');
$parts[$k] = $v;
}
$t = $parts['t'] ?? '';
$v1 = $parts['v1'] ?? '';
if (!ctype_digit($t) || strlen($v1) !== 64 || abs(time() - (int) $t) > 300) return false;
$want = hash_hmac('sha256', $t . '.' . $rawBody, $secret);
return hash_equals($want, $v1);
}
C#
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
// header: the X-Meetowt-Signature value; rawBody: the body exactly as it arrived; secret: your signing secret.
// A malformed header is answered false, never an exception.
static bool Genuine(string header, string rawBody, string secret)
{
string? t = null, v1 = null;
foreach (var p in (header ?? "").Split(','))
{
var kv = p.Trim().Split('=', 2);
if (kv.Length == 2 && kv[0] == "t") t = kv[1];
if (kv.Length == 2 && kv[0] == "v1") v1 = kv[1];
}
if (t == null || !Regex.IsMatch(t, "^[0-9]{1,12}$") || !long.TryParse(t, out var seconds)) return false;
if (v1 == null || !Regex.IsMatch(v1, "^[0-9a-f]{64}$")) return false;
if (Math.Abs(DateTimeOffset.UtcNow.ToUnixTimeSeconds() - seconds) > 300) return false;
var want = HMACSHA256.HashData(Encoding.UTF8.GetBytes(secret), Encoding.UTF8.GetBytes(t + "." + rawBody));
return CryptographicOperations.FixedTimeEquals(want, Convert.FromHexString(v1));
}
Java
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.util.HexFormat;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
// header: the X-Meetowt-Signature value; rawBody: the body exactly as it arrived; secret: your signing secret. Java 17 or later.
// A malformed header is answered false, never an exception.
static boolean genuine(String header, String rawBody, String secret) throws Exception {
String t = null, v1 = null;
for (String p : String.valueOf(header).split(",")) {
String[] kv = p.trim().split("=", 2);
if (kv.length == 2 && kv[0].equals("t")) t = kv[1];
if (kv.length == 2 && kv[0].equals("v1")) v1 = kv[1];
}
if (t == null || v1 == null || !t.matches("[0-9]{1,12}") || !v1.matches("[0-9a-f]{64}")) return false;
if (Math.abs(System.currentTimeMillis() / 1000 - Long.parseLong(t)) > 300) return false;
Mac mac = Mac.getInstance("HmacSHA256");
mac.init(new SecretKeySpec(secret.getBytes(StandardCharsets.UTF_8), "HmacSHA256"));
byte[] want = mac.doFinal((t + "." + rawBody).getBytes(StandardCharsets.UTF_8));
return MessageDigest.isEqual(want, HexFormat.of().parseHex(v1));
}