-
How do edit profile information such as username or fields and such? I might be just stupid but I can't seem to find anything. Or is that not possible for some reason? |
Beta Was this translation helpful? Give feedback.
Answered by
neet
Jan 9, 2024
Replies: 1 comment 1 reply
-
Hi @alzawad26, thank you for posting a question. You can edit a profile for an authorised user by You can use it as follows: import { createRestAPIClient } from "masto";
const client = createRestAPIClient({ ... });
await client.v1.accounts.updateCredentials({
displayName: "My new name",
fieldsAttributes: [
{
name: "my title",
value: "my value",
},
],
}); You can see other available parameters on the official documentation. I hope this helps |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
TxzK
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @alzawad26, thank you for posting a question. You can edit a profile for an authorised user by
rest.v1.accounts.updateCredentials
(Indeed it has a little bit tricky name).You can use it as follows:
You can see other available parameters on the official documentation. I hope this helps
https://docs.joinmastodon.org/methods/accounts/#update_credentials