Please log in to the MaiAgent system backend and follow these steps:
Click the "Username" dropdown menu in the upper right corner.
Click "Account" to go to the profile page.
Switch the page to the API Key page.
You can then copy and view the "API Key".
Security Reminder: Please keep your API key secure and do not share it in public places.
Key Format Description: The API key is a combination of alphanumeric characters.
Error Handling
When authentication fails, the API will return a 401 Unauthorized HTTP error code:
Invalid or Missing API Key
Fix suggestion: Check if the request header contains the correct Authorization field. The format should be: Authorization: Api-Key YOUR_API_KEY
Incorrect API Key Format
Fix suggestion: Confirm that the API Key format is correct. Check if the correct prefix Api-Key is used instead of Bearer, and ensure the API Key itself does not have extra spaces or characters.