Skip to main content

Try a bot in 10 minutes (Windows PowerShell or iOS Shortcuts)

A no-build, 10-minute path to run your first mpbot: verify the token with getMe, read a chat_id with getUpdates, and reply with sendMessage on Windows or iOS.

Goal: run the minimal three-call chain getMe → getUpdates → sendMessage without writing a project. Pick your platform below. A real bot token is required; keep it private.


Overview

The fastest way to confirm your token works and you can send a message. The three calls are platform-independent; only the tool differs (PowerShell on Windows, Shortcuts on iOS).

Prerequisites

  • An mpbot token (a test/dev bot kept separate from production).

  • You have already sent at least one message to the bot in MPChat — a bot cannot start a conversation, so this creates the chat_id.

  • Never share the token via iCloud, screenshots, or chat.

Windows: PowerShell (3 steps)

Set the token for the current session, then run each call:

$token = "YOUR_MPBOT_TOKEN"# 1) getMe - verify the token
Invoke-RestMethod -Uri "https://call.mp.net/bot/bot$token/getMe" -Method Get# 2) getUpdates - read chat_id from your earlier message
$body = '{"timeout":5,"limit":10}'
Invoke-RestMethod -Uri "https://call.mp.net/bot/bot$token/getUpdates" -Method Post -ContentType "application/json" -Body $body# 3) sendMessage - reply (paste the chat id from step 2)
$send = '{"chat_id":"YOUR_CHAT_ID","text":"Hello from mpbot."}'
Invoke-RestMethod -Uri "https://call.mp.net/bot/bot$token/sendMessage" -Method Post -ContentType "application/json" -Body $send

iOS: Shortcuts (3 steps)

Create three "Get Contents of URL" shortcuts. Pass the token via an "Ask for Input" action — do not enable iCloud sharing.

  • getMe: GET https://call.mp.net/bot/bot{token}/getMe — success is "ok": true.

  • getUpdates: POST with header Content-Type: application/json and body {"timeout":5,"limit":10}. Read result[].message.chat.id.

  • sendMessage: POST with body {"chat_id":"<chat_id>","text":"Hello from mpbot."}.

How to read success

  • Every response is JSON. Success looks like { "ok": true, "result": ... }.

  • After step 3, the message appears in your MPChat conversation with the bot.

Troubleshooting

  • 401: token is wrong or revoked — re-check it.

  • getUpdates returns []: you have not messaged the bot yet, or the updates were already consumed.

  • 409: a webhook is enabled, which is mutually exclusive with polling. Do not run deleteWebhook yourself; contact the bot maintainer.

  • 400 on sendMessage: the chat_id is wrong or no conversation exists yet.

Related

This is a try-it flow with simplified parameters. For real development use the curl/Node.js quickstart and proper offset handling.

Did this answer your question?