Grid


PwnGRID authentication mechanism is based on the RSA keypair that’s unique to each unit and generated on boot. In order to authenticate, the unit needs to perform a procedure called “enrollment”, which consists in sending a cryptographically signed payload in order to prove the unit’s identity.

After this payload is verified server side, a standard JWT token is generated and sent to the unit for further requests. This token has to be refreshed every 30 minutes and must be used via the Authentication header as:

POST https://api.pwnagotchi.ai/api/v1/some-api-path
...
...
Authorization: token ... JWT token here ...
...

Despite the RSA keys can be moved from /etc/pwnagotchi/ and used on any computer, leaving them on your unit and authenticating through it will provide basic hardware isolation and therefore improve the security of the keys.

All requests go to https://api.pwnagotchi.ai/, paths indicated with do not require authentication, the ones with instead require the aforementioned JWT token.

GET /api/v1/units

Get a paged list of all the enrolled units, use ?p=2 for pages other than the first one.

Example Response

GET /api/v1/units/by_country

Get a list of countries and number of units registered for each.

Example Response

GET /api/v1/unit/{fingerprint}

Get information about a unit given its fingerprint.

Example Response

POST /api/v1/unit/enroll

Enroll a unit with its RSA keypair and give it a JWT token for further authenticated requests.

Example Request

Example Response

GET /api/v1/unit/inbox

Get a paged list of all PwnMAIL inbox messages.

Example Response

GET /api/v1/unit/inbox/{id}

Get a message given its identifier. The content is encrypted and must be decrypted.

Example Response

GET /api/v1/unit/inbox/{id}/{mark}

Mark a message given its identifier, mark can be seen, unseen or deleted.

POST /api/v1/unit/{fingerprint}/inbox

Send an encrypted message to a unit by its fingerprint. The content must be signed and encrypted.

Example Request

POST /api/v1/unit/report/ap

Fully opted-in units can use this API to report a pwned access point.

Example Request

POST /api/v1/unit/report/aps

To report multiple access points at once.

Example Request