Skip to main content

Signature

getUserDetails(): Promise<any>

HTTP request

GET https://api.pindo.io/orgs/self/
This method takes no parameters. It uses the token provided to the constructor to identify the authenticated organization.

Response

A successful response contains a data object with an orgs array:
{
  "data": {
    "orgs": [
      {
        "name": "your-org-name"
      }
    ]
  }
}

Example

import { PindoSMS } from 'pindo-sms';

const pindo = new PindoSMS('your-api-token');

const result = await pindo.getUserDetails();
console.log(result.data.orgs);

Error handling

try {
  const result = await pindo.getUserDetails();
} catch (err) {
  console.error('Failed to fetch user details:', err.message);
}

Build docs developers (and LLMs) love