-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Problem
When creating a new user and calling the https://api.chatengine.io/users/ api, I want to send in the avatar image. I've tried to send it as avatar (sends an error) and avatarUrl (no error but avatar image not updated), but it doesn't get set.
This is my current API call:
outer.post("/signUp", async (req, res) => {
try {
const { username, password, avatar } = req.body;
const chatEngineResponse = await axios.post(
"https://api.chatengine.io/users/",
{
username: username,
secret: password,
avatarUrl: avatar // How do I pass in the avatar image url properly?
},
{
headers: { "Private-Key": process.env.PRIVATE_KEY }
}
);
res.status(200).json({ response: chatEngineResponse.data });
} catch (error) {
console.error("Error", error.message);
res.status(500).json({ error: error.message });
}
});Question
How do I pass in the avatar image url properly?
Metadata
Metadata
Assignees
Labels
No labels