Skip to main content

Developers

Everything you need to build on Sunshine.

REST API

A JSON API over HTTPS. Create a personal API token in your account settings and send it with every request.

Base URL

https://sunshine.rescoot.org/api/v1

Authentication

Send your token in the Authorization header. A personal API token has full access to your account, so keep it secret.

curl -H "Authorization: Bearer $SUNSHINE_TOKEN" \
  https://sunshine.rescoot.org/api/v1/scooters

Create an API token

What you can reach

  • Scooters, their state, and their telemetry
  • Commands: lock, unlock, blinkers, horn, sounds, seatbox, alarm, ping, hibernate
  • Navigation destination and current location
  • Trips, events, and log bundles
  • Saved destinations

Full reference

The complete endpoint reference, with parameters and response formats, lives in the repository.

Open the API reference

OAuth

Build an app that acts for other Sunshine users. Register an OAuth application, then use the authorization code flow with PKCE.

Register an application

Scopes

read Read the user's account and scooter data.
write Change the user's account data.
scooter_control Send commands to the user's scooter.

Flow

Authorization code with PKCE (S256). Public clients need only a client ID; confidential clients also get a secret. Refresh tokens are issued.

Endpoints

GET  /oauth/authorize
POST /oauth/token

Your users see a consent screen naming your app and the scopes it asks for.

MCP server

Sunshine speaks the Model Context Protocol, so assistants such as Claude can read scooter state and run the same commands as the web app.

Endpoint

POST https://sunshine.rescoot.org/mcp

Streamable HTTP. Requests and responses are JSON-RPC over a single POST.

Authentication

Authenticate with the same bearer token as the REST API. Read tools need the read scope; tools that send a command need scooter_control.

Tools

alarm clear_destination get_destination get_scooter get_state hibernate honk list_scooters list_trips locate_scooter lock_scooter open_seatbox ping_scooter play_sound set_blinkers set_destination unlock_scooter

Example

curl -X POST https://sunshine.rescoot.org/mcp \
  -H "Authorization: Bearer $SUNSHINE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Commands are sent to the scooter, so a successful response means the command was accepted, not that it already took effect.