> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.tangerine365.com/llms.txt.
> For full documentation content, see https://docs.tangerine365.com/llms-full.txt.

# Get User Profile

POST https://localhost:8090//api/user/userdetailsbyuserid
Content-Type: application/x-www-form-urlencoded

The `POST /api/user/userdetailsbyuserid` endpoint is used to retrieve user details based on the user ID.

### Request

- Method: POST
    
- Base URL: {{baseUrl}}
    
- Path: /api/user/userdetailsbyuserid
    
- Headers:
    
    - Content-Type: application/x-www-form-urlencoded
        
- Body:
    
    - `userid` (text): The user ID for which details are to be retrieved.
        
    - `auth` (text): The authentication token for the request.
        

### Response

The response will be in JSON format and will include the following fields:

- `success` (boolean): Indicates if the request was successful.
    
- `message` (string): Additional information or error message.
    
- `details` (object): Object containing user details with the following fields:
    
    - `idst` (string): The user's ID.
        
    - `userid` (string): The user's ID.
        
    - `firstname` (string): The user's first name.
        
    - `lastname` (string): The user's last name.
        
    - `avatar` (string): URL to the user's avatar.
        
    - `email` (string): The user's email address.
        
    - `signature` (string): The user's signature.
        
    - `valid` (string): Indicates if the user is valid.
        
    - `pwd_expire_at` (string): Date when the user's password expires.
        
    - `register_date` (string): Date of user registration.
        
    - `last_enter` (string): Date of user's last entry.
        
    - `custom_fields` (array): Array of custom fields associated with the user.

Reference: https://docs.tangerine365.com/tangerine-365-enterprise/get-user-profile

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Tangerine365 Enterprise
  version: 1.0.0
paths:
  //api/user/userdetailsbyuserid:
    post:
      operationId: get-user-profile
      summary: Get User Profile
      description: >-
        The `POST /api/user/userdetailsbyuserid` endpoint is used to retrieve
        user details based on the user ID.


        ### Request


        - Method: POST
            
        - Base URL: {{baseUrl}}
            
        - Path: /api/user/userdetailsbyuserid
            
        - Headers:
            
            - Content-Type: application/x-www-form-urlencoded
                
        - Body:
            
            - `userid` (text): The user ID for which details are to be retrieved.
                
            - `auth` (text): The authentication token for the request.
                

        ### Response


        The response will be in JSON format and will include the following
        fields:


        - `success` (boolean): Indicates if the request was successful.
            
        - `message` (string): Additional information or error message.
            
        - `details` (object): Object containing user details with the following
        fields:
            
            - `idst` (string): The user's ID.
                
            - `userid` (string): The user's ID.
                
            - `firstname` (string): The user's first name.
                
            - `lastname` (string): The user's last name.
                
            - `avatar` (string): URL to the user's avatar.
                
            - `email` (string): The user's email address.
                
            - `signature` (string): The user's signature.
                
            - `valid` (string): Indicates if the user is valid.
                
            - `pwd_expire_at` (string): Date when the user's password expires.
                
            - `register_date` (string): Date of user registration.
                
            - `last_enter` (string): Date of user's last entry.
                
            - `custom_fields` (array): Array of custom fields associated with the user.
      tags:
        - ''
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Get User Profile_Response_200'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                auth:
                  type: string
                userid:
                  type: string
              required:
                - auth
                - userid
servers:
  - url: https://localhost:8090
components:
  schemas:
    ApiUserUserdetailsbyuseridPostResponsesContentApplicationJsonSchemaDetails:
      type: object
      properties:
        idst:
          type: string
        email:
          type: string
          format: email
        valid:
          type: string
        avatar:
          description: Any type
        userid:
          type: string
        lastname:
          type: string
        firstname:
          type: string
        signature:
          description: Any type
        last_enter:
          description: Any type
        custom_fields:
          type: array
          items:
            description: Any type
        pwd_expire_at:
          description: Any type
        register_date:
          type: string
      required:
        - idst
        - email
        - valid
        - userid
        - lastname
        - firstname
        - custom_fields
        - register_date
      title: >-
        ApiUserUserdetailsbyuseridPostResponsesContentApplicationJsonSchemaDetails
    Get User Profile_Response_200:
      type: object
      properties:
        details:
          $ref: >-
            #/components/schemas/ApiUserUserdetailsbyuseridPostResponsesContentApplicationJsonSchemaDetails
        message:
          type: string
        success:
          type: boolean
      required:
        - details
        - message
        - success
      title: Get User Profile_Response_200

```

## SDK Code Examples

```python Get User Profile_example
import requests

url = "https://localhost:8090//api/user/userdetailsbyuserid"

payload = ""
headers = {"Content-Type": "application/x-www-form-urlencoded"}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
```

```javascript Get User Profile_example
const url = 'https://localhost:8090//api/user/userdetailsbyuserid';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/x-www-form-urlencoded'},
  body: new URLSearchParams('')
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Get User Profile_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://localhost:8090//api/user/userdetailsbyuserid"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Get User Profile_example
require 'uri'
require 'net/http'

url = URI("https://localhost:8090//api/user/userdetailsbyuserid")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/x-www-form-urlencoded'

response = http.request(request)
puts response.read_body
```

```java Get User Profile_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://localhost:8090//api/user/userdetailsbyuserid")
  .header("Content-Type", "application/x-www-form-urlencoded")
  .asString();
```

```php Get User Profile_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://localhost:8090//api/user/userdetailsbyuserid', [
  'form_params' => null,
  'headers' => [
    'Content-Type' => 'application/x-www-form-urlencoded',
  ],
]);

echo $response->getBody();
```

```csharp Get User Profile_example
using RestSharp;

var client = new RestClient("https://localhost:8090//api/user/userdetailsbyuserid");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
IRestResponse response = client.Execute(request);
```

```swift Get User Profile_example
import Foundation

let headers = ["Content-Type": "application/x-www-form-urlencoded"]

let request = NSMutableURLRequest(url: NSURL(string: "https://localhost:8090//api/user/userdetailsbyuserid")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```