GET /api/auth/verify
Verify that your HTTP Basic Auth credentials are valid and return information about the authenticated user. This endpoint requires authentication.Request
No parameters required. Simply include valid authentication credentials in the request header.Response
Always
true when the request is successful (if false, you would receive a 401 error instead)The username of the authenticated admin user
Example Response
Success (200)Status Codes
Authentication successful, credentials are valid
Authentication failed or credentials are invalid
Use Cases
This endpoint is useful for:- Testing credentials: Verify that your API credentials are correct before making other authenticated requests
- Session validation: Check if credentials are still valid in long-running applications
- User information: Retrieve the username associated with the credentials being used
- Health checks: Verify that the authentication system is working correctly
Authentication Details
The API uses HTTP Basic Authentication with credentials stored as environment variables in Cloudflare Workers:- Username:
ADMIN_USER(environment variable) - Password:
ADMIN_PASS(environment variable)
- Combine username and password with a colon:
username:password - Encode the string in Base64
- Prepend “Basic ” to the encoded string