Creating Users, is it possible? #807
Replies: 2 comments 2 replies
-
Hi @GerritKuilder, thank you for posting a question. The answer is yes, you can create an account by the following code. There had been a bug in the old versions of Masto.js in order to create an account #808, so please make sure you've updated with the latest version before running the snippet. import { login } from 'masto';
const client = await login({
url: process.env.MASTODON_URL,
accessToken: process.env.MASTODON_TOKEN,
});
const token = await client.v1.accounts.create({
username: 'your_username',
password: 'your_password',
email: '[email protected]',
agreement: true,
locale: 'en',
});
// Prints your access token
console.log(token); be sure that you have to click a link that is sent to your email address before access to your account. I hope it helps |
Beta Was this translation helpful? Give feedback.
2 replies
-
A bit of an old answer, so not relevant further |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I looked through the code, tests, examples etc.
I was not able to find a function that was able to create an account, is this possible?
Kind Regards,
Gerrit Kuilder
Beta Was this translation helpful? Give feedback.
All reactions