π API Authentication
Larasonic uses Laravel Sanctum for API authentication. You can generate tokens in two ways:Via Web Interface
Visit/api/tokens
in your browser to manage API tokens (requires appropriate permissions). Here you can:
- Create new tokens with specific abilities
- View existing tokens
- Revoke tokens
Via API
This is not supported yet. Please let us know if you need this feature in the roadmapUsing Tokens
Include the token in your API requests:For more details on API authentication, check out the Laravel Sanctum documentation.
π API Documentation
Larasonic uses Scribe to automatically generate comprehensive API documentation. This includes:- Interactive API documentation
- Postman collection export
- OpenAPI (Swagger) specification
- Request/response examples
/docs
by default.
π Example Endpoints
Hereβs a sample API endpoint from theapp/Http/Controllers/ApiUserController.php
:
For API documentation features, visit the Scribe documentation.