You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BeeAPI Go uses API key authentication for protected endpoints (POST, PUT, DELETE). When the server starts for the first time, it generates a unique API key and saves it in a `.api-key` file in the root directory.
65
+
66
+
To authenticate your requests to protected endpoints:
67
+
68
+
1. Look for the API key in the `.api-key` file or in the server logs when it starts
69
+
2. Include the API key in your requests' Authorization header:
70
+
71
+
```bash
72
+
curl -X POST "http://localhost:5000/theme" \
73
+
-H "Authorization: Bearer YOUR_API_KEY" \
74
+
-d "name=new-theme"
75
+
```
76
+
77
+
If you're using Docker, you can access the API key by:
78
+
79
+
```bash
80
+
docker exec beeapi-go cat /app/.api-key
81
+
```
82
+
83
+
Make sure to keep this key secure as it provides administrative access to your BeeAPI instance.
84
+
62
85
## API Documentation
63
86
64
87
The API documentation is available at `/swagger/index.html` when the server is running.
0 commit comments