# 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 ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get User in an Organization version: endpoint_user.GetUser paths: /User/{userId}: get: operationId: get-user summary: Get User in an Organization description: >- Use this endpoint to retrieve information about a specific user within an organization. tags: - - subpackage_user parameters: - name: userId in: path description: The Payabli-generated `userId` value. required: true schema: type: integer format: int64 - name: entry in: query description: The entrypoint identifier. required: false schema: type: string - name: level in: query description: 'Entry level: 0 - partner, 2 - paypoint' required: false schema: type: integer - name: requestToken in: header required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/type_:UserQueryRecord' '400': description: Bad request/ invalid data content: {} '401': description: Unauthorized request. content: {} '500': description: Internal API Error content: {} '503': description: Database connection error content: {} components: schemas: type_:UsrAccess: type: object properties: roleLabel: type: string roleValue: type: boolean type_:AdditionalDataString: type: string type_:CreatedAt: type: string format: date-time type_:Email: type: string format: email type_:Language: type: string type_:NameUser: type: string type_:PhoneNumber: type: string type_:Orgentryname: type: string type_:Orgid: type: integer format: int64 type_:Orgtype: type: integer type_:OrgXScope: type: object properties: orgEntry: $ref: '#/components/schemas/type_:Orgentryname' orgId: $ref: '#/components/schemas/type_:Orgid' orgType: $ref: '#/components/schemas/type_:Orgtype' type_:Timezone: type: integer type_:Mfa: type: boolean type_:MfaMode: type: integer type_:UsrStatus: type: integer type_:UserQueryRecord: type: object properties: Access: type: array items: $ref: '#/components/schemas/type_:UsrAccess' AdditionalData: $ref: '#/components/schemas/type_:AdditionalDataString' createdAt: $ref: '#/components/schemas/type_:CreatedAt' description: The timestamp for the user's creation, in UTC. Email: $ref: '#/components/schemas/type_:Email' description: The user's email address. language: $ref: '#/components/schemas/type_:Language' lastAccess: type: string format: date-time description: The timestamp for the user's last activity, in UTC. Name: $ref: '#/components/schemas/type_:NameUser' Phone: $ref: '#/components/schemas/type_:PhoneNumber' description: The user's phone number. Scope: type: array items: $ref: '#/components/schemas/type_:OrgXScope' snData: type: string description: >- Additional data provided by the social network related to the customer. snIdentifier: type: string description: Identifier or token for customer in linked social network. snProvider: type: string description: >- Social network linked to customer. Possible values: facebook, google, twitter, microsoft. timeZone: $ref: '#/components/schemas/type_:Timezone' userId: type: integer format: int64 description: The user's ID in Payabli. UsrMFA: $ref: '#/components/schemas/type_:Mfa' UsrMFAMode: $ref: '#/components/schemas/type_:MfaMode' UsrStatus: $ref: '#/components/schemas/type_:UsrStatus' ``` ## SDK Code Examples ```typescript import { PayabliClient, PayabliEnvironment } from "@payabli/sdk-node"; async function main() { const client = new PayabliClient({ environment: PayabliEnvironment.Sandbox, apiKey: "YOUR_API_KEY_HERE", }); await client.user.getUser(1000000, { entry: "478ae1234", }); } main(); ``` ```python from payabli import payabli from payabli.environment import payabliEnvironment client = payabli( environment=payabliEnvironment.SANDBOX, api_key="YOUR_API_KEY_HERE" ) client.user.get_user( user_id=1000000, entry="478ae1234" ) ``` ```csharp using PayabliApi; using System.Threading.Tasks; namespace Usage; public class Example { public async Task Do() { var client = new PayabliApiClient( apiKey: "YOUR_API_KEY_HERE", clientOptions: new ClientOptions { BaseUrl = PayabliApiEnvironment.Sandbox } ); await client.User.GetUserAsync( 1000000L, new GetUserRequest { Entry = "478ae1234" } ); } } ``` ```go package example import ( client "github.com/payabli/sdk-go/v/client" option "github.com/payabli/sdk-go/v/option" payabli "github.com/payabli/sdk-go/v" context "context" ) func do() { client := client.NewClient( option.WithBaseURL( payabli.Environments.Sandbox, ), option.WithApiKey( "YOUR_API_KEY_HERE", ), ) request := &payabli.GetUserRequest{ Entry: payabli.String( "478ae1234", ), } client.User.GetUser( context.TODO(), 1000000, request, ) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api-sandbox.payabli.com/api/User/1000000?entry=478ae1234") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["requestToken"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api-sandbox.payabli.com/api/User/1000000?entry=478ae1234") .header("requestToken", "") .asString(); ``` ```php request('GET', 'https://api-sandbox.payabli.com/api/User/1000000?entry=478ae1234', [ 'headers' => [ 'requestToken' => '', ], ]); echo $response->getBody(); ``` ```swift import Foundation let headers = ["requestToken": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/User/1000000?entry=478ae1234")! 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() ```