Introduction
Welcome to the Weellu API TOKEN! You can use our API to access Kittn API endpoints, which can get information on our public api service.
We have language bindings in Shell, Ruby, Python, and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.
Authentication
Weellu Chat uses token-based authentication to secure API requests.
To authenticate, you must include an Authorization header in every request.
curl -X GET "https://api.weellu.com/api/v1/endpoint" \
-H "Authorization: Bearer 66e9f5d097decf1df323dac2"
fetch('https://api.weellu.com/api/v1/endpoint', {
method: 'GET',
headers: {
'Authorization': 'Bearer 66e9f5d097decf1df323dac2'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
The endpoint will be one of the following
Channel API - Get Projects
This endpoint allows you to retrieve a list of projects from your account based on the room type and other query parameters.
HTTP Request
GET https://api.weellu.com/api/v1/channel/v2
Authentication
- Required: You must include the
Authorizationheader from the Authentication section.
Query Parameters
roomType(string, required): The room type (e.g.,"p"for projects).page(integer, optional): Pagination, defaults to 1.limit(integer, optional): The number of results per page, defaults to 30.title(string, optional): Search within your projects by title.
Example Request (Shell)
curl -X GET "https://api.weellu.com/api/v1/channel/v2?roomType=p&page=1&limit=30" \
-H "Authorization: Bearer 66e9f5d097decf1df323dac2"
fetch('https://api.weellu.com/api/v1/channel/v2?roomType=p&page=1&limit=30', {
method: 'GET',
headers: {
'Authorization': 'Bearer 66e9f5d097decf1df323dac2'
}
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
- Response should like this
{
"code": 2000,
"data": {
"docs": [
{
"_id": "65faf9abe5c7cd1a0e10436b",
"rId": "65faf9abe5c7cd1a0e104368",
"t": "project for communication",
"img": "default-project-icon.png",
"lastMessage": {
"c": "last message here",
"mT": "text",
"createdAt": "2024-08-29T14:05:47.225Z"
}
}
],
"totalDocs": 8,
"page": 1,
"limit": 30
}
}
You will require to get the rId to process the next request for your apis
Errors
The Weellu API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request -- Your request is invalid. |
| 401 | Unauthorized -- Your API key is wrong. |
| 403 | Forbidden -- The kitten requested is hidden for administrators only. |
| 404 | Not Found -- The specified kitten could not be found. |
| 405 | Method Not Allowed -- You tried to access a kitten with an invalid method. |
| 406 | Not Acceptable -- You requested a format that isn't json. |
| 410 | Gone -- The kitten requested has been removed from our servers. |
| 418 | I'm a teapot. |
| 429 | Too Many Requests -- You're requesting too many kittens! Slow down! |
| 500 | Internal Server Error -- We had a problem with our server. Try again later. |
| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |