> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Get user

GET https://api-sandbox.payabli.com/api/User/{userId}

Use this endpoint to retrieve information about a specific user within an organization.

Reference: https://docs.payabli.com/developers/api-reference/user/get-user-in-an-organization

## Authentication

- `Authorization` header (bearer token, required)
- `requestToken` header (required) — Long-lived API token sent in the `requestToken` header. See [API token authentication](/developers/api-tokens).

## Servers

- `https://api-sandbox.payabli.com/api` (Sandbox, default)
- `https://api.payabli.com/api` (Production)

## Request

### Path parameters

- `userId` (long, required) — The Payabli-generated `userId` value.

### Query parameters

- `entry` (string, optional) — The entrypoint identifier.
- `level` (integer, optional) — Entry level: 0 - partner, 2 - paypoint

## Response

### 200

Success

- `Access` (list of object, optional)
  - `roleLabel` (string, optional)
  - `roleValue` (boolean, optional)
- `AdditionalData` (string, optional) — Custom dictionary of key:value pairs. You can use this field to store any data related to the object or for your system. Example usage: ```json { "additionalData": { "key1": "value1", "key2": "value2", "key3": "value3" } } ```
- `createdAt` (datetime, optional) — The timestamp for the user's creation, in UTC.
- `Email` (string, optional) — The user's email address.
- `language` (string, optional) — The language code.
- `lastAccess` (datetime, optional) — The timestamp for the user's last activity, in UTC.
- `Name` (string, optional)
- `Phone` (string, optional) — The user's phone number.
- `Scope` (list of object, optional)
  - `orgEntry` (string, optional) — The entryname for the org, in string format. If you leave this blank, Payabli uses the DBA name.
  - `orgId` (long, optional) — Organization ID. Unique identifier assigned to an org by Payabli.
  - `orgType` (integer, optional) — The organization type. Currently, this must be `0`.
- `snData` (string, optional) — Additional data provided by the social network related to the customer.
- `snIdentifier` (string, optional) — Identifier or token for customer in linked social network.
- `snProvider` (string, optional) — Social network linked to customer. Possible values: facebook, google, twitter, microsoft.
- `timeZone` (integer, optional) — Timezone, in UTC offset. For example, -5 is Eastern time.
- `userId` (long, optional) — The user's ID in Payabli.
- `UsrMFA` (boolean, optional) — When `true`, multi-factor authentication (MFA) is enabled.
- `UsrMFAMode` (integer, optional)
- `UsrStatus` (integer, optional) — The user's status: - Inactive: `0` - Active: `1` - Deleted: `-99` - Locked: `85`

## Examples

**Response**

```json
{
  "Access": [
    {
      "roleLabel": "customers",
      "roleValue": true
    }
  ],
  "AdditionalData": "AdditionalData",
  "createdAt": "2022-07-01T15:00:01Z",
  "Email": "example@email.com",
  "language": "en",
  "lastAccess": "2022-07-01T15:00:01Z",
  "Name": "Sean Smith",
  "Phone": "5555555555",
  "Scope": [
    {
      "orgEntry": "pilgrim-planner",
      "orgId": 123,
      "orgType": 0
    }
  ],
  "snData": "snData",
  "snIdentifier": "snIdentifier",
  "snProvider": "google",
  "timeZone": -5,
  "userId": 1000000,
  "UsrMFA": false,
  "UsrMFAMode": 0,
  "UsrStatus": 1
}
```

**SDK Code**

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        clientId: "YOUR_CLIENT_ID",
        clientSecret: "YOUR_CLIENT_SECRET",
    });
    await client.user.getUser(1000000, {
        entry: "8cfec329267",
    });
}
main();

```

```python
from payabli import payabli

client = payabli(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

client.user.get_user(
    user_id=1000000,
    entry="8cfec329267",
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliApiClient;
import io.github.payabli.api.resources.user.requests.GetUserRequest;

public class Example {
    public static void main(String[] args) {
        PayabliApiClient client = PayabliApiClient.withCredentials("YOUR_CLIENT_ID", "YOUR_CLIENT_SECRET")
            .build()
        ;

        client.user().getUser(
            1000000L,
            GetUserRequest
                .builder()
                .entry("8cfec329267")
                .build()
        );
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.user.get_user(
  user_id: 1000000,
  entry: "8cfec329267"
)

```

```csharp
using PayabliApi;
using System.Threading.Tasks;

public partial class Examples
{
    public async Task Example() {
        var client = new PayabliApiClient(
            clientId: "YOUR_CLIENT_ID",
            clientSecret: "YOUR_CLIENT_SECRET"
        );

        await client.User.GetUserAsync(
            userId: 1000000L,
            request: new GetUserRequest {
                Entry = "8cfec329267"
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    payabli "github.com/payabli/sdk-go"
    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithClientCredentials(
            "YOUR_CLIENT_ID",
            "YOUR_CLIENT_SECRET",
        ),
    )
    request := &payabli.GetUserRequest{
        Entry: payabli.String(
            "8cfec329267",
        ),
    }
    client.User.GetUser(
        context.TODO(),
        int64(1000000),
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;
use Payabli\User\Requests\GetUserRequest;

$client = new PayabliClient(
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
);
$client->user->getUser(
    1000000,
    new GetUserRequest([
        'entry' => '8cfec329267',
    ]),
);

```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/User/1000000?entry=8cfec329267")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```