Introduction
This api documentation contains all the endpoints for the malingo project. a platform where you can effortlessly find companions for your next adventure, be it a travel buddy, a dining partner, or someone to join you for a stroll or a random conversation. Malingo is a solution that enables individuals to connect, share experiences, and foster new relationships while splitting costs or covering expenses as agreed.
This documentation aims to provide all the information you need to work with our API.
Authenticating requests
This API is not authenticated.
Activities
Get all activities
requires authentication
Example request:
curl --request GET \
--get "https://rrn24.techchantier.com/malingo/public/api/api/activity" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activity"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"created_activities": [
{
"id": 1,
"user_id": 1,
"title": "Hiking Adventure",
"ActivityPhoto": null,
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T08:19:02.000000Z",
"updated_at": "2025-02-04T08:19:02.000000Z"
},
{
"id": 2,
"user_id": 1,
"title": "Hiking Adventure",
"ActivityPhoto": null,
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T08:25:56.000000Z",
"updated_at": "2025-02-04T08:25:56.000000Z"
},
{
"id": 3,
"user_id": 1,
"title": "Hiking Adventure",
"ActivityPhoto": null,
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T08:36:04.000000Z",
"updated_at": "2025-02-04T08:36:04.000000Z"
},
{
"id": 4,
"user_id": 1,
"title": "Hiking Adventure",
"ActivityPhoto": "activity_photos/rj6fjePPJweFYZf07s9dCtAjL84pKv12XGzWIW81.jpg",
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:07:10.000000Z",
"updated_at": "2025-02-04T09:07:10.000000Z"
},
{
"id": 5,
"user_id": 1,
"title": "Join me at Tech Chantier",
"ActivityPhoto": "activity_photos/2bAlnxzYIELlyfUW02fyNbLIobPMGzrUj8DLtchk.jpg",
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:11:42.000000Z",
"updated_at": "2025-02-04T09:11:42.000000Z"
},
{
"id": 6,
"user_id": 1,
"title": "Join me at Tech Chantier",
"ActivityPhoto": "activity_photos/OfdYJQsOrGOnYCKFtPDrhhv2Kp7PP5zZ40Q08Exk.jpg",
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:13:20.000000Z",
"updated_at": "2025-02-04T09:13:20.000000Z"
},
{
"id": 7,
"user_id": 1,
"title": "Join me at Tech Chantier",
"ActivityPhoto": "activity_photos/wvnmS2UuVkm1pfcNbhqcq6ouYonmj3G5Qd2KL69x.jpg",
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 40,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:18:46.000000Z",
"updated_at": "2025-02-04T09:18:46.000000Z"
}
],
"pending_activities": [],
"accepted_activities": [],
"declined_activities": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Create a new activity
requires authentication
Example request:
curl --request POST \
"https://rrn24.techchantier.com/malingo/public/api/api/activity" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Morning Run\",
\"ActivityPhoto\": \"consequatur\",
\"description\": \"A group run in the park.\",
\"link\": \"https:\\/\\/zoom.com\\/meeting\",
\"numberOfMembers\": 17,
\"location\": \"Central Park\",
\"time\": \"2025-01-01 10:00:00\"
}"
const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activity"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Morning Run",
"ActivityPhoto": "consequatur",
"description": "A group run in the park.",
"link": "https:\/\/zoom.com\/meeting",
"numberOfMembers": 17,
"location": "Central Park",
"time": "2025-01-01 10:00:00"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"title": "Join me at Tech Chantier",
"ActivityPhoto": "activity_photos/wvnmS2UuVkm1pfcNbhqcq6ouYonmj3G5Qd2KL69x.jpg",
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": "40",
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"user_id": 1,
"updated_at": "2025-02-04T09:18:46.000000Z",
"created_at": "2025-02-04T09:18:46.000000Z",
"id": 7
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get activity details
requires authentication
Example request:
curl --request GET \
--get "https://rrn24.techchantier.com/malingo/public/api/api/activity/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activity/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 5,
"user_id": 1,
"title": "Join me at Tech Chantier",
"ActivityPhoto": "activity_photos/2bAlnxzYIELlyfUW02fyNbLIobPMGzrUj8DLtchk.jpg",
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:11:42.000000Z",
"updated_at": "2025-02-04T09:11:42.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Update an activity
requires authentication
Example request:
curl --request PUT \
"https://rrn24.techchantier.com/malingo/public/api/api/activity/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"Morning Run\",
\"ActivityPhoto\": \"consequatur\",
\"description\": \"A group run in the park.\",
\"link\": \"https:\\/\\/zoom.com\\/meeting\",
\"numberOfMembers\": 17,
\"location\": \"Central Park\",
\"time\": \"2025-01-01 10:00:00\"
}"
const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activity/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "Morning Run",
"ActivityPhoto": "consequatur",
"description": "A group run in the park.",
"link": "https:\/\/zoom.com\/meeting",
"numberOfMembers": 17,
"location": "Central Park",
"time": "2025-01-01 10:00:00"
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"id": 5,
"user_id": 1,
"title": "Hiking go and hike with me",
"ActivityPhoto": "activity_photos/uNughpq7aXWNcUTYFOgFBFEFxqcr3DeY60PuOwNu.jpg",
"description": "this is a good activity",
"link": "https//wa.me/237672474539",
"numberOfMembers": "10",
"location": "buea",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:11:42.000000Z",
"updated_at": "2025-02-04T11:35:10.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Delete an activity
requires authentication
Example request:
curl --request DELETE \
"https://rrn24.techchantier.com/malingo/public/api/api/activity/1" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activity/1"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Activity deleted successfully"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Activity
Retrieve a list of users who have joined a particular activity.
Example request:
curl --request GET \
--get "https://rrn24.techchantier.com/malingo/public/api/api/activities/1/joined-users" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activities/1/joined-users"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
"join_requests": [
{
"id": 3,
"activity_id": 6,
"user_id": 2,
"status": "pending",
"created_at": "2025-04-06T10:16:03.000000Z",
"updated_at": "2025-04-06T10:16:03.000000Z",
"activity": {
"id": 6,
"title": "React and React Native Bootcamp Conference",
"location": "buea, Cameroon",
"time": "2025-02-15 08:00:00"
},
"user": {
"id": 2,
"name": "Ambo Njock",
"email": "ambo@gmail.com"
}
}
]
}
Example response (404):
{
"message": "Activity not found"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Activity Management
Join an activity
requires authentication
Example request:
curl --request POST \
"https://rrn24.techchantier.com/malingo/public/api/api/activities/1/join" \
--header "Authorization: string required The authentication token. Example: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"activity_id\": 17
}"
const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activities/1/join"
);
const headers = {
"Authorization": "string required The authentication token. Example: Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"activity_id": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Join request sent successfully.",
"join_request": {
"user_id": 2,
"status": "pending",
"activity_id": 5,
"updated_at": "2025-02-04T12:16:50.000000Z",
"created_at": "2025-02-04T12:16:50.000000Z",
"id": 1
}
}
Example response (400):
{
"message": "You have already requested to join this activity."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
GET api/activities/user
requires authentication
Example request:
curl --request GET \
--get "https://rrn24.techchantier.com/malingo/public/api/api/activities/user" \
--header "Authorization: string required The authentication token. Example: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activities/user"
);
const headers = {
"Authorization": "string required The authentication token. Example: Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"created_activities": [
{
"id": 1,
"user_id": 1,
"title": "Hiking Adventure",
"ActivityPhoto": null,
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T08:19:02.000000Z",
"updated_at": "2025-02-04T08:19:02.000000Z"
* },
{
"id": 2,
"user_id": 1,
"title": "Hiking Adventure",
"ActivityPhoto": null,
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T08:25:56.000000Z",
"updated_at": "2025-02-04T08:25:56.000000Z"
},
{
"id": 3,
"user_id": 1,
"title": "Hiking Adventure",
"ActivityPhoto": null,
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T08:36:04.000000Z",
"updated_at": "2025-02-04T08:36:04.000000Z"
},
{
"id": 4,
"user_id": 1,
"title": "Hiking Adventure",
"ActivityPhoto": "activity_photos/rj6fjePPJweFYZf07s9dCtAjL84pKv12XGzWIW81.jpg",
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:07:10.000000Z",
"updated_at": "2025-02-04T09:07:10.000000Z"
},
{
"id": 5,
"user_id": 1,
"title": "Join me at Tech Chantier",
"ActivityPhoto": "activity_photos/2bAlnxzYIELlyfUW02fyNbLIobPMGzrUj8DLtchk.jpg",
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:11:42.000000Z",
"updated_at": "2025-02-04T09:11:42.000000Z"
},
{
"id": 6,
"user_id": 1,
"title": "Join me at Tech Chantier",
"ActivityPhoto": "activity_photos/OfdYJQsOrGOnYCKFtPDrhhv2Kp7PP5zZ40Q08Exk.jpg",
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 10,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:13:20.000000Z",
"updated_at": "2025-02-04T09:13:20.000000Z"
},
{
"id": 7,
"user_id": 1,
"title": "Join me at Tech Chantier",
"ActivityPhoto": "activity_photos/wvnmS2UuVkm1pfcNbhqcq6ouYonmj3G5Qd2KL69x.jpg",
"description": "A thrilling hike to the mountain peak.",
"link": "https://example.com/hiking-event",
"numberOfMembers": 40,
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:18:46.000000Z",
"updated_at": "2025-02-04T09:18:46.000000Z"
}
],
"pending_activities": [],
"accepted_activities": [],
"declined_activities": []
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Activity Request
Accept a join request
requires authentication
Example request:
curl --request POST \
"https://rrn24.techchantier.com/malingo/public/api/api/join-request/1/accept" \
--header "Authorization: string required The authentication token. Example: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"joinRequest_id\": 1
}"
const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/join-request/1/accept"
);
const headers = {
"Authorization": "string required The authentication token. Example: Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"joinRequest_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Join request accepted",
"whatsapp_link": "https://wa.me/1234567890"
}
Example response (403):
{
"message": "Unauthorized"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Decline a join request
requires authentication
Example request:
curl --request POST \
"https://rrn24.techchantier.com/malingo/public/api/api/join-request/1/decline" \
--header "Authorization: string required The authentication token. Example: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"joinRequest_id\": 1
}"
const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/join-request/1/decline"
);
const headers = {
"Authorization": "string required The authentication token. Example: Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"joinRequest_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "Your request to join this activity has been declined"
}
Example response (403):
{
"message": "Unauthorized"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get join requests for user's activities
requires authentication
Example request:
curl --request GET \
--get "https://rrn24.techchantier.com/malingo/public/api/api/activities/join-requests" \
--header "Authorization: string required The authentication token. Example: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activities/join-requests"
);
const headers = {
"Authorization": "string required The authentication token. Example: Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"join_requests": [
{
"id": 1,
"activity_id": 5,
"user_id": 2,
"status": "pending",
"created_at": "2025-02-04T12:16:50.000000Z",
"updated_at": "2025-02-04T12:16:50.000000Z",
"activity": {
"id": 5,
"title": "Join me at Tech Chantier",
"location": "Mount Fako, Cameroon",
"time": "2025-02-15 08:00:00"
},
"user": {
"id": 2,
"name": "Nkwi Cyril",
"email": "nkwicyril@gmail.com"
}
}
]
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Request leave from an activity
requires authentication
Example request:
curl --request POST \
"https://rrn24.techchantier.com/malingo/public/api/api/activity/1/leave" \
--header "Authorization: string required The authentication token. Example: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"activity_id\": 17
}"
const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activity/1/leave"
);
const headers = {
"Authorization": "string required The authentication token. Example: Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"activity_id": 17
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"message": "Leave request sent successfully",
"leaveRequest": {
"user_id": 2,
"activity_id": 9,
"status": "pending",
"updated_at": "2025-02-04T13:16:58.000000Z",
"created_at": "2025-02-04T13:16:58.000000Z",
"id": 1
}
}
Example response (403):
{
"message": "You are not a participant in this activity"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Approve a leave request
requires authentication
Example request:
curl --request POST \
"https://rrn24.techchantier.com/malingo/public/api/api/leave-requests/17/approve" \
--header "Authorization: string required The authentication token. Example: Bearer {token}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"leaveRequest_id\": 1
}"
const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/leave-requests/17/approve"
);
const headers = {
"Authorization": "string required The authentication token. Example: Bearer {token}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"leaveRequest_id": 1
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"message": "The leave request has been approved"
}
Example response (403):
{
"message": "You are not authorized to approve this request"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Authentication
Endpoints for user registration, login, and logout.
Register a new user
Create a new user account and generate an authentication token.
Example request:
curl --request POST \
"https://rrn24.techchantier.com/malingo/public/api/api/register" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"name\": \"John Doe\",
\"email\": \"john@example.com\",
\"password\": \"secretpassword\",
\"password_confirmation\": \"secretpassword\"
}"
const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/register"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"name": "John Doe",
"email": "john@example.com",
"password": "secretpassword",
"password_confirmation": "secretpassword"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (201):
{
"user": {
"name": "Nkuma Confident",
"email": "nsem@gmail.com",
"updated_at": "2025-02-04T08:18:33.000000Z",
"created_at": "2025-02-04T08:18:33.000000Z",
"id": 1
},
"token": "1|zoNArNwtRQijtSUA8qLUAFctGhOI1W1OUnVRm0GZcc1b2217"
}
Example response (422):
{
"message": "The email has already been taken. (and 1 more error)",
"errors": {
"email": [
"The email has already been taken."
],
"password": [
"The password field confirmation does not match."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Log in an existing user
Authenticate a user using email and password, and generate an authentication token.
Example request:
curl --request POST \
"https://rrn24.techchantier.com/malingo/public/api/api/login" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"john@example.com\",
\"password\": \"secretpassword\"
}"
const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/login"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "john@example.com",
"password": "secretpassword"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
{
"user": {
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"created_at": "2025-01-21T10:00:00",
"updated_at": "2025-01-21T10:00:00"
},
"token": "1|laravel_sanctum_token_string_here"
}
Example response (401):
{
"message": "Invalid credentials"
}
Example response (422):
{
"message": "The given data was invalid.",
"errors": {
"email": [
"The selected email is invalid."
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Log out the current user Revoke all of the user's tokens to log them out.
requires authentication
Example request:
curl --request POST \
"https://rrn24.techchantier.com/malingo/public/api/api/logout" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/logout"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());Example response (200):
{
"message": "Successfully logged out"
}
Example response (401):
{
"message": "Unauthenticated"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Endpoints
Get a single user's public profile
Example request:
curl --request GET \
--get "https://rrn24.techchantier.com/malingo/public/api/api/users/consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/users/consequatur"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (404):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "The route malingo/public/api//api/users/consequatur could not be found."
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
General User Enpoints
GET api/user
requires authentication
Example request:
curl --request GET \
--get "https://rrn24.techchantier.com/malingo/public/api/api/user" \
--header "reguires: a toke" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/user"
);
const headers = {
"reguires": "a toke",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 2,
"name": "Nkwi Cyril",
"email": "nkwicyril@gmail.com",
"email_verified_at": null,
"created_at": "2025-02-04T09:37:07.000000Z",
"updated_at": "2025-02-04T09:37:07.000000Z"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Profile Management
Edit User Profile
requires authentication
Example request:
curl --request POST \
"https://rrn24.techchantier.com/malingo/public/api/api/user/edit-profile" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "age=17"\
--form "mobile_number=consequatur"\
--form "profile_picture=@C:\Users\NSEM CONFIDENT NJOCK\AppData\Local\Temp\php1F0B.tmp" const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/user/edit-profile"
);
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('age', '17');
body.append('mobile_number', 'consequatur');
body.append('profile_picture', document.querySelector('input[name="profile_picture"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"age": 30,
"mobile_number": "+1234567890",
"profile_picture": "path/to/profile/picture.jpg"
}
Example response (422):
{
"message": "Validation failed",
"errors": {
"mobile_number": [
"The mobile number format is invalid"
]
}
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Get Current User Profile
requires authentication
Example request:
curl --request GET \
--get "https://rrn24.techchantier.com/malingo/public/api/api/user/profile" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/user/profile"
);
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
{
"id": 1,
"name": "John Doe",
"email": "john@example.com",
"age": 30,
"mobile_number": "+1234567890",
"profile_picture": "path/to/profile/picture.jpg"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Searching
Filter activities by title, description, date, and location Retrieve activities based on specified filters.
Example request:
curl --request GET \
--get "https://rrn24.techchantier.com/malingo/public/api/api/activities/filter?title=consequatur&description=Dolores+dolorum+amet+iste+laborum+eius+est+dolor.&date=consequatur&location=consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"title\": \"consequatur\",
\"description\": \"Dolores dolorum amet iste laborum eius est dolor.\",
\"location\": \"consequatur\"
}"
const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/activities/filter"
);
const params = {
"title": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"date": "consequatur",
"location": "consequatur",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"title": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"location": "consequatur"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Example response (200):
[
{
"id": 5,
"user_id": 1,
"title": "Hiking go and hike with me",
"ActivityPhoto": "activity_photos/QDEBUm8GSGbdAFob56QOh4EidyLtgFR5NckhQFBQ.jpg",
"description": "this is a good activity",
"link": "https//wa.me/237672474539",
"numberOfMembers": 10,
"location": "buea",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:11:42.000000Z",
"updated_at": "2025-02-04T11:43:41.000000Z"
}
]
Example response (400):
{
"message": "Invalid date format, please use a valid date"
}
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.
Search activities by parameter or specific fields Search for activities using a general parameter or specific field filters.
Example request:
curl --request GET \
--get "https://rrn24.techchantier.com/malingo/public/api/api/search/consequatur?title=consequatur&description=Dolores+dolorum+amet+iste+laborum+eius+est+dolor.&location=consequatur&date=consequatur" \
--header "Content-Type: application/json" \
--header "Accept: application/json"const url = new URL(
"https://rrn24.techchantier.com/malingo/public/api/api/search/consequatur"
);
const params = {
"title": "consequatur",
"description": "Dolores dolorum amet iste laborum eius est dolor.",
"location": "consequatur",
"date": "consequatur",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Example response (200):
[
{
"id": 5,
"user_id": 1,
"title": "Hiking go and hike with me",
"ActivityPhoto": "activity_photos/QDEBUm8GSGbdAFob56QOh4EidyLtgFR5NckhQFBQ.jpg",
"description": "this is a good activity",
"link": "https//wa.me/237672474539",
"numberOfMembers": 10,
"location": "buea",
"time": "2025-02-15 08:00:00",
"created_at": "2025-02-04T09:11:42.000000Z",
"updated_at": "2025-02-04T11:43:41.000000Z"
}
]
Received response:
Request failed with error:
Tip: Check that you're properly connected to the network.
If you're a maintainer of ths API, verify that your API is running and you've enabled CORS.
You can check the Dev Tools console for debugging information.