-
Notifications
You must be signed in to change notification settings - Fork 0
endpoints
All endpoints on this api have a default rate limit of 30 requests per minute.
If a specific endpoint has a different rate limit I will specify that in that endpoints section.
If you make a request to the API after exceeding the rate limit you will get an error like this:
// Status code: 429
{
"error": "Rate limit exceeded: 30 per 1 minute"
}
*results may vary if the endpoint has a different limit
If you exceeds the limit. STOP WHAT YOU'RE DOING RIGHT NOW. why you spamming me. I don't like it. Also after the minute ends you can continue making your requests. Also imagine tryna spam and getting rate limited (skill issue)
These are errors that you can get on pretty much all endpoints. This is why i'm gonna keep them all here so i don't have to put them in each endpoints section. If the endpoint has any additional errors to be noted i will include them in that endpoints section.
If incorrect input has been passed to the api, you might get a validation error.
This should be on every endpoint so keep that in mind when making a request.
The status code of that error will be 422 and it will look like this:
Schema:

What it will look like:
{
"detail": [
{
"loc": [
"string",
0
],
"msg": "string",
"type": "string"
}
]
}
Invalid Request:
curl -X 'GET' \
'https://chatapi.fusionsid.xyz/api/users/kjgbewt235' \
-H 'accept: application/json' \
-H 'Authorization: Bearer <access token>'
The error here is that that endpoint requires the input to be an integer and i passed in "kjgbewt235"
which is not a valid integer. Here is what you get back:
Unsuccessful Response:
{
"detail": [
{
"loc": ["path", "user_id"],
"msg": "value is not a valid integer",
"type": "type_error.integer",
}
]
}
In the response it will tell you what value was an incorrect value and what exactly the error was.
Most endpoints on this api require authorization.
If authorization has not been provided (bearer token not in Authorization header), you will an error.
Example of a request which will give an error:
Invalid Request:
curl -X 'GET' \
'https://chatapi.fusionsid.xyz/api/user/me' \
-H 'accept: application/json'
The reason this raises an error is because no token has been passed in.
So you get this:
Unsuccessful Response
// status code: 401
{
"detail": "Not authenticated"
}