GET
/
v1
/
apps
/
{app_id}
/
users
/
get_or_create
/
{name}
import Honcho from 'honcho-ai';

const client = new Honcho({
  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const user = await client.apps.users.getOrCreate('app_id', 'name');

  console.log(user.id);
}

main();
{
  "id": "<string>",
  "name": "<string>",
  "app_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "metadata": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

app_id
string
required
name
string
required

Response

200
application/json
Successful Response
id
string
required
name
string
required
app_id
string
required
created_at
string
required
metadata
object
required