Files
osmap_cli/README.md
T

3.7 KiB

OSMAP Embed Map & Token CLI

Unified CLI utility and API reference for generating embed tokens and URLs for all OSMAP domains:

  1. app.osmap.id (Share-Map Token API)
  2. live.osmap.id (KAI Live App Token)
  3. beta.osmap.id (KAI Beta App Token)

🚀 cURL Reference by Domain

1. New Share-Map System (app.osmap.id)

API Endpoint: POST https://api.osmap.id/apps/token/share-map
Embed Format: https://app.osmap.id/maps/embed/<map_id>?token=<token>

Map 1: Accelerometer (Map ID: 94)

curl -X POST "https://api.osmap.id/apps/token/share-map" \
  -H "Content-Type: application/json" \
  -d '{"app_id":"6f728437e6c4d361fb811913b8acd70e","app_secret":"ab9419a7fed7c51a6ff6daf501d408f2aed25c0ccd148a6c18b76f54949f55d8","expires_in":86400,"map_id":94}'

Map 2: ROCC (Map ID: 46)

curl -X POST "https://api.osmap.id/apps/token/share-map" \
  -H "Content-Type: application/json" \
  -d '{"app_id":"6f728437e6c4d361fb811913b8acd70e","app_secret":"ab9419a7fed7c51a6ff6daf501d408f2aed25c0ccd148a6c18b76f54949f55d8","expires_in":86400,"map_id":46}'

Map 3: Genset (Map ID: 74)

curl -X POST "https://api.osmap.id/apps/token/share-map" \
  -H "Content-Type: application/json" \
  -d '{"app_id":"6f728437e6c4d361fb811913b8acd70e","app_secret":"ab9419a7fed7c51a6ff6daf501d408f2aed25c0ccd148a6c18b76f54949f55d8","expires_in":86400,"map_id":74}'

Map 4: RCS (Map ID: 72)

curl -X POST "https://api.osmap.id/apps/token/share-map" \
  -H "Content-Type: application/json" \
  -d '{"app_id":"6f728437e6c4d361fb811913b8acd70e","app_secret":"ab9419a7fed7c51a6ff6daf501d408f2aed25c0ccd148a6c18b76f54949f55d8","expires_in":86400,"map_id":72}'

Map 5: JPL (Map ID: 70)

curl -X POST "https://api.osmap.id/apps/token/share-map" \
  -H "Content-Type: application/json" \
  -d '{"app_id":"2ee1aa4876f6b7fa3c43c75ca1c83139","app_secret":"073d0929a74bb664c402de98d24153c1f9f2f648d59c381f2fef3c32610fa174","expires_in":86400,"map_id":70}'

2. OSMAP KAI System (live.osmap.id)

API Endpoint: POST https://live.osmap.id/api/apps/token
Embed Format: https://live.osmap.id/<route>?token=<token>

curl -X POST "https://live.osmap.id/api/apps/token" \
  -H "Content-Type: application/json" \
  -d '{
    "app_id": "IrSIcf06QRwUCmsRCZ0JvsVibSfuPUG4",
    "app_secret": "Z8tPOBHGbwWu9TrIddRqkiDFDymtiPAhMNbSz6aUOOTkqdZoQYuTWXTra5m2mPQa",
    "expires_in_hours": 24
  }'

3. OSMAP KAI System (beta.osmap.id)

API Endpoint: POST https://beta.osmap.id/api/apps/token
Embed Format: https://beta.osmap.id/<route>?token=<token>

curl -X POST "https://beta.osmap.id/api/apps/token" \
  -H "Content-Type: application/json" \
  -d '{
    "app_id": "IrSIcf06QRwUCmsRCZ0JvsVibSfuPUG4",
    "app_secret": "Z8tPOBHGbwWu9TrIddRqkiDFDymtiPAhMNbSz6aUOOTkqdZoQYuTWXTra5m2mPQa",
    "expires_in_hours": 24
  }'

🛠️ CLI Usage (osmap-embed.sh)

chmod +x ./osmap-embed.sh

Launch Interactive Navigator

./osmap-embed.sh

Allows selecting maps from app.osmap.id or routes from live.osmap.id / beta.osmap.id with live environment switching!

Quick Commands

Goal Command
Show all cURL commands ./osmap-embed.sh curls
View app.osmap.id embed URLs ./osmap-embed.sh all
View live.osmap.id embed URLs ./osmap-embed.sh all --env live
View beta.osmap.id embed URLs ./osmap-embed.sh all --env beta
Open map from app.osmap.id in browser ./osmap-embed.sh accelerometer --open
Open KAI route in browser ./osmap-embed.sh executive --env live --open
Get token string only ./osmap-embed.sh token 94 or ./osmap-embed.sh token executive