From c4002b37c32f7918d6b94538d8b56b3ca03f707e Mon Sep 17 00:00:00 2001 From: Hossain Khan Date: Sat, 31 Jan 2026 08:40:40 -0500 Subject: [PATCH] docs: Add README for TRMNL API specification - Document OpenAPI portal link and API documentation resources - Explain authentication methods (device-level vs user-level) - Reference implementation files in the codebase --- project-resources/trmnl-api/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 project-resources/trmnl-api/README.md diff --git a/project-resources/trmnl-api/README.md b/project-resources/trmnl-api/README.md new file mode 100644 index 0000000..da76ae9 --- /dev/null +++ b/project-resources/trmnl-api/README.md @@ -0,0 +1,25 @@ +# TRMNL API Specification + +This directory contains the OpenAPI specification for the TRMNL API. + +## Resources + +- **OpenAPI Portal:** https://trmnl.com/api-docs/index.html +- **API Documentation:** https://docs.usetrmnl.com/go +- **Private API Docs:** https://docs.usetrmnl.com/go/private-api/introduction + +## Files + +- `trmnl-openapi.yaml` - OpenAPI 3.0.1 specification exported from the TRMNL API portal + +## Authentication + +The TRMNL API uses two authentication methods: + +1. **Device-level authentication** - Uses `Access-Token` header with device API key + - Implemented in `TrmnlApiService.kt` + - Used for device operations (display, setup, etc.) + +2. **User-level authentication** - Uses `Authorization: Bearer` header with account API key + - Implemented in `TrmnlUserApiService.kt` + - Used for account operations (device management, plugin settings, etc.)