docs: use production share API endpoint

This commit is contained in:
2026-08-16 02:11:51 +07:00 Unverified
parent 0494de677d
commit 0ab69c2553
+4 -4
View File
@@ -4,7 +4,7 @@ Use this endpoint when a trusted Discord bot needs to publish a member's text
attachment and return a public Erika Share link.
```http
POST /api/share
POST https://erika.sudloh.com/api/share
Authorization: Bearer <SHARE_BOT_SECRET>
Content-Type: multipart/form-data
```
@@ -27,7 +27,7 @@ The website needs these values before the endpoint can work:
The bot can use its own variable names:
```dotenv
ERIKA_BASE_URL=https://example.com
ERIKA_BASE_URL=https://erika.sudloh.com
ERIKA_SHARE_BOT_SECRET=replace-with-the-same-secret
```
@@ -145,7 +145,7 @@ if (imageAttachment?.name) {
```bash
curl --fail-with-body \
-X POST "https://example.com/api/share" \
-X POST "https://erika.sudloh.com/api/share" \
-H "Authorization: Bearer $ERIKA_SHARE_BOT_SECRET" \
-F "file=@./message.txt;type=text/plain" \
-F "senderDiscordId=123456789012345678" \
@@ -161,7 +161,7 @@ The API returns HTTP `201`:
"success": true,
"share": {
"id": "a1b2c3d4",
"url": "https://example.com/share/a1b2c3d4",
"url": "https://erika.sudloh.com/share/a1b2c3d4",
"author": {
"displayName": "Example User",
"avatarUrl": "https://cdn.discordapp.com/avatars/..."