Oumla Docs
  • Quick start
  • Introduction
  • Security
  • Networks
  • Authentication
  • Use cases
  • SDK
    • Oumla client
    • Create a Profile
    • Getting Profiles
    • Generate a Wallet
    • Getting Wallets
    • Generate Addresses
    • Getting Addresses
    • Getting Transactions
    • Sending Transactions
    • SDK reference
  • API Reference
    • Organization routes
    • Profiles routes
    • Wallet routes
    • Addresses routes
    • Transactions routes
  • Types
  • FAQs
Powered by GitBook
On this page
  1. SDK

Create a Profile

Create a profile for your user

PreviousOumla clientNextGetting Profiles

Last updated 9 months ago

Profiles play a central role, acting as the core for wallets, addresses, and transactions. When integrating a user into your system for blockchain interaction, having a wallet is key

Profiles establish a direct link between your system's users and their corresponding wallets in ours. Creating a profile involves sending the user type and a reference, such as a UUID or email. This reference is necessary for tasks like generating addresses and handling transactions.

Here are the properties for createProfile function:

property
description
required
type

reference

specify which user

required

string

type

specify which type of wallet.

required

User | Department | Merchant

Example: of how to create a profile

import { Oumla } from "@oumla/sdk";

const client = new Oumla({
   apiKey: process.env.API_KEY,
   // Additional options...
});

const profile =  await client.profiles.create({
    type: "User",
    reference: "dba1fea5-2004-4ea8-a06d-a7c7c5559b8f",
});

// you can print 
   console.log(profile);
// return type is Profile

The expected output

{
  message: 'Profile created',
  profile: {
    reference: 'dba1fea5-2004-4ea8-a06d-a7c7c5559b8f',
    type: 'User'
  }
}
Everything starts with the profile