Update Profile
This API is used to update user information such as avatar, name, and gender
Request
PUT /v1/profile HTTP/1.1
Host: profile-dev.api.mimiland.io
Content-Type: application/json
mm-client-id: mml
mm-user-id: 66c5ae097139a22bc2bb61d3
Authorization: bearer v4.public.eyJhZC*****5xTtpdbQI
Content-Length: 205
{
"includes":"name;status;avartarUrl;gender",
"name":"coder",
"status":"active",
"url":"https://learn.g2.com/hubfs/G2CM_FI128_Learn_Article_Images-%5BIDE%5D_V1a.png",
"gender":1
}
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("mm-client-id", "mml");
myHeaders.append("mm-user-id", "66c5ae097139a22bc2bb61d3");
myHeaders.append("Authorization", "bearer v4.public.eyJhZC*****5xTtpdbQI");
const raw = JSON.stringify({
"includes": "name;status;avartarUrl;gender",
"name": "coder",
"status": "active",
"url": "https://learn.g2.com/hubfs/G2CM_FI128_Learn_Article_Images-%5BIDE%5D_V1a.png",
"gender": 1
});
const requestOptions = {
method: "PUT",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://profile-dev.api.mimiland.io/v1/profile", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
Last updated