Authentication
All API requests are authenticated using an API key passed via the X-API-KEY HTTP header.
curl -X GET "https://api.linkshark.xyz/link/external/v1/shortenedUrl?page=0&size=20" \
-H "X-API-KEY: your_api_key_here"Important: Every request must include the
X-API-KEYheader. Requests without it will receive a401 Unauthorizedresponse.
How It Works
- Generate an API key from the LinkShark Dashboard.
- Include the key in the
X-API-KEYheader of every request. - The server validates your key and associates the request with your organization.
- If the key is missing, invalid, or expired, the API returns a
401 Unauthorizederror.
Header Format
| Header | Type | Required | Description |
|---|---|---|---|
X-API-KEY | string | Yes | Your API key obtained from the dashboard |
Example
curl -X POST "https://api.linkshark.xyz/link/external/v1/shortenedUrl/save" \
-H "X-API-KEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com"}'Error Responses
Missing API Key:
HTTP/1.1 401 Unauthorized
Please send API key in the requestInvalid API Key:
HTTP/1.1 401 Unauthorized
API Key is Invalid. Please check your API Key or generate a new oneAuthentication error responses are returned as plain text, not JSON.
Last updated on