Skip to content

How do I edit profile info #1031

Answered by neet
TxzK asked this question in Q&A
Jan 9, 2024 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

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:

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
https://docs.joinmastodon.org/methods/accounts/#update_credentials

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TxzK
Comment options

Answer selected by TxzK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants