-
Type:
Suggestion
-
Resolution: Unresolved
-
Component/s: Product - API
Issue Summary
When sending a POST request to the https://api.trello.com/1/boards/ endpoint with a missing token parameter, the API correctly returns a 401 Unauthorized status, but the response body contains the {"message": "missing scopes"}
This message is misleading and does not clearly communicate that the request failed due to a missing authentication token, making it difficult for developers to quickly identify and resolve the issue.
Steps to Reproduce
- Obtain a valid Trello API Key (no token).
- Send a POST request to the boards endpoint with only the API Key: {{POST https://api.trello.com/1/boards/?key=\
{apiKey}
&name=TestBoard}}
- Observe the response status and body.
Expected Results
The API returns a 401 Unauthorized response with a clear and descriptive error message that identifies the authentication issue, for example:
{"message": "Authentication credentials are missing or invalid. A valid token is required to access this endpoint."}
Actual Results
The API returns a 401 Unauthorized response with the following body:
{"message": "missing scopes"}
This message does not clearly indicate that a token is missing, causing confusion for developers who may not immediately understand the cause of the error.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available