Hi developers! This update brings two highly requested features, JSON API error responses and an endpoint to modify a guild member's score.
JSON API errors
When you encounter an API error, you will now get a response formatted as JSON, which will include two fields: code and message, alongside a standard HTTP status code. In addition, the errors will be more detailed where the error is not generic, such as a guild member not being found. In this case, the response will be something like this:
{ "code": 1003, "message": "Unknown guild member" }
For generic errors such as bad requests, the code will always be 0.
{ "code": 0, "message": "400: Bad Request" } { "code": 0, "message": "401: Unauthorized" }
For a full list of JSON error codes and their respective descriptions, see the full reference on our API documentation here.
Modify guild member score endpoint
The other highly requested feature that makes it way as part of this update, is the endpoint to modify a guild member's score.
To use this endpoint, you must have the MANAGE_GUILD permission in the guild, unless you are the guild owner.
Note: Guild admins who do not explicitly have this permission are unable to use this endpoint. This will be fixed soon.
Update 08 July 2021: This issue is now fixed.
For each request, you are able to add or remove between 1 and 100,000 server score.
See the full reference for this endpoint on the guilds API documentation page.
Wrap up
Thanks for reading and stay tuned for more updates. Be sure to follow our Twitter and join our Discord server to stay up to date with the latest info.
Hassie | API Developer & Maintainer
- 1
- 1
- 1
- 1
- 3
Recommended Comments
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now