Users
These methods allow you to manage your Neon user account.
Operations
| Method | Endpoint | Description |
|---|---|---|
GET | /users/me | Retrieve current user details |
GET | /users/me/organizations | List organizations for the current user |
POST | /users/me/projects/transfer | Transfer projects from personal account to organization (deprecated) |
GET | /auth | Retrieve request authentication details |
Example
Retrieve current user details, with the TypeScript SDK:
ts
import { Neon } from "@octridev/neon";
const client = new Neon({
// Optional: replaces the default server and any server an operation declares.
baseUrl: "https://console.neon.tech/api/v2",
auth: { bearerAuth: process.env.API_TOKEN! },
});
const result = await client.users.getCurrentInfo();
console.log(result);Nine more languages
The same call exists in every SDK. See SDKs for the other nine.