Create a new API Key that is tied to the current user account. The created API key is only listed ONCE upon creation. It can however be regenerated or deleted.
POST
/
auth
/
api_keys
Typescript (SDK)
Copy
import { Latitudesh } from "latitudesh-typescript-sdk";
const latitudesh = new Latitudesh({
bearer: process.env["LATITUDESH_BEARER"] ?? "",
});
async function run() {
const result = await latitudesh.apiKeys.create({
data: {
type: "api_keys",
attributes: {
name: "App Token",
},
},
});
console.log(result);
}
run();