users.create
import { Client, Orvano } from '@orvano/js/server'
const orvano = new Orvano( new Client({ endpoint: 'https://orvano.example.com', apiKey: process.env.ORVANO_API_KEY }),)
const user = await orvano.users.create({ email: 'ada@example.com', password: 'correct horse battery staple',})console.log(user)import 'dart:io';
import 'package:orvano_dart/orvano_dart.dart';
Future<void> main() async { final orvano = Orvano( Client( endpoint: 'https://orvano.example.com', apiKey: Platform.environment['ORVANO_API_KEY'], ), ); final user = await orvano.users.create( CreateUserRequest( email: 'ada@example.com', password: 'correct horse battery staple', ), ); print(user.toJson());}using Orvano;
using var orvano = new OrvanoClient(new OrvanoClientOptions(new Uri("https://orvano.example.com")){ ApiKey = Environment.GetEnvironmentVariable("ORVANO_API_KEY"),});var user = await orvano.Users.CreateAsync(new CreateUserRequest( Email: "ada@example.com", Password: "correct horse battery staple"));Console.WriteLine(user);Creates a user with an email and password. It does not sign them in.
Server SDKs: JavaScript on a server, Dart, and .NET call it with an API key. API key scope: users.write. A failure answers with a problem details body; its code has a page under Errors.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A new user with an email and password, created by a server. No session is created.
object
The email, trimmed, at most 320 characters. Unique in the project, ignoring case.
8 to 256 characters after Unicode NFKC normalization.
True to create the user with their email already verified, as when importing accounts. Defaults to false.
Responses
Section titled “Responses”The request has succeeded and a new resource has been created as a result.
A user of a project.
object
The user ID.
Whether the email has been verified. Also the access token’s email_verified claim.
Whether the user may sign in.
Your own data about the user: a JSON object of at most 16 KB.
object
When the user signed up.
Example
{ "id": "01924f5e-8d2b-7c4d-8e21-3d5e6f7a8b9c", "email": "ada@example.com", "emailVerified": false, "name": "Ada Lovelace", "status": "active"}default
Section titled “default”An unexpected error response.
An RFC 9457 problem details body. Every operation declares it as its default response, sent
as application/problem+json.
object
Identifies the error: https://orvano.dev/errors/<code>.
The standard HTTP reason phrase for the status.
The HTTP status code.
A short, safe sentence about this occurrence, when the server has one.
Orvano’s stable error code, from the ErrorCode catalog. SDKs treat it as a plain string.
The request ID to quote when reporting a problem; also sent as X-Request-Id.
Example
{ "type": "https://orvano.dev/errors/not_found", "title": "Not Found", "status": 404, "code": "not_found", "requestId": "4bf92f3577b34da6a3ce929d0e0e4736"}