> This page is for Postman API Docs.

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Get authenticated user

GET https://api.postman.com/me

Gets information about the authenticated user.

**Note:**

- This API returns a different response for users with the [Guest and Partner roles](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles).
- The `flow_count` response only returns for users on [Free plans](https://www.postman.com/pricing/).


Reference: https://learning.postman.com/api-docs/api-reference/users/get-authenticated-user

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Servers

- `https://api.postman.com` (https://api.postman.com, default)
- `https://api.eu.postman.com` (https://api.eu.postman.com)

## Response

### 200

Successful Response

- `user` (GetAuthenticatedUserUser, optional) — Information about the authenticated user.
- `operations` (list of GetAuthenticatedUserOperationsItems, optional) — Information about operations and their usage limits. This object does not return for users with the [Guest and Partner role](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles).

## Errors

### 401 Unauthorized Error

Unauthorized

- `GetAuthenticatedUserRequestUnauthorizedError`
  - Error (Type, Title, Detail, Status): commonErrorTypeTitleDetailStatus
  - Error (Name, Message): commonErrorNameMessage

### 500 Internal Server Error

Internal Server Error

- `GetAuthenticatedUserRequestInternalServerError`
  - Error (Type, Title, Detail): commonErrorTypeTitleDetail
  - Error (Type, Title, Detail, Status): commonErrorTypeTitleDetailStatus
  - Error (Name, Message): commonErrorNameMessage

## Types

### GetAuthenticatedUserUser

Information about the authenticated user.

- `id` (double, optional) — The user's Postman ID.
- `sub` (string, optional) — The authenticated user's ID. This ID is unique to the user and isn't associated with any Postman teams. Can return in UUID or ID format.
- `username` (string, optional) — The user's username.
- `email` (string, optional) — The user's email address.
- `fullName` (string, optional) — The user's full name.
- `avatar` (string, optional, nullable) — The user's avatar image URL.
- `isPublic` (boolean, optional) — If true, the user's information is public and visible to all users.
- `emailVerified` (boolean, optional) — If true, the user email address is verified by Postman.
- `teamId` (integer, optional) — The team ID the user is assigned to. This returns a `0` value if the user is not assigned to a team.
- `teamName` (string, optional) — The name of the team the user is assigned to.
- `teamDomain` (string, optional) — The team's Postman domain ID.
- `roles` (list of string, optional) — A list of the user's assigned [roles](https://learning.postman.com/docs/collaborating-in-postman/roles-and-permissions/#team-roles).

### GetAuthenticatedUserOperationsItems

- `limit` (double, optional) — The operation's limit value.
- `name` (string, optional) — The operation's name.
- `overage` (double, optional) — The operation's overage value.
- `usage` (double, optional) — The operation's current usage value.

### commonErrorTypeTitleDetailStatus

- `type` (CommonErrorTypeTitleDetailStatusType, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — Information about the error.
- `status` (integer, optional) — The error's HTTP status code.

### commonErrorNameMessage

- `error` (CommonErrorNameMessageError, optional) — Information about the error.

### commonErrorTypeTitleDetail

- `type` (string, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (CommonErrorTypeTitleDetailDetail, optional) — Information about the error.

### CommonErrorTypeTitleDetailStatusType

The type of error.

- string
- string

### CommonErrorNameMessageError

Information about the error.

- `name` (string, optional) — The error name.
- `message` (string, optional) — The error message.

### CommonErrorTypeTitleDetailDetail

Information about the error.

- string
- map from string to any

## Examples

### Successful Response

**Response**

```json
{
  "user": {
    "id": 12345678,
    "sub": "4d71435e-0e67-45b9-9d4c-e3262166d157",
    "username": "taylor-lee",
    "email": "taylor.lee@example.com",
    "fullName": "Taylor Lee",
    "avatar": "https://res.cloudinary.com/postman/image/upload/t_user_profile_300/v1/user/default-6",
    "isPublic": true,
    "emailVerified": true,
    "teamId": 123,
    "teamName": "Test Team",
    "teamDomain": "test-team",
    "roles": [
      "user",
      "flow-editor",
      "community-manager"
    ]
  },
  "operations": [
    {
      "limit": 99999999,
      "name": "api_object_usage",
      "overage": 0,
      "usage": 8872
    },
    {
      "limit": 99999999,
      "name": "collection_run_limit",
      "overage": 0,
      "usage": 226
    },
    {
      "limit": 1,
      "name": "file_storage_limit",
      "overage": 0,
      "usage": 0.28
    },
    {
      "limit": 1000000,
      "name": "flow_requests",
      "overage": 0,
      "usage": 1852
    },
    {
      "limit": 99999999,
      "name": "performance_test_limit",
      "overage": 0,
      "usage": 10
    },
    {
      "limit": 100,
      "name": "reusable_packages",
      "overage": 0,
      "usage": 48
    },
    {
      "limit": 1000,
      "name": "test_data_retrieval",
      "overage": 0,
      "usage": 180
    },
    {
      "limit": 10,
      "name": "test_data_storage",
      "overage": 0,
      "usage": 0.55
    },
    {
      "limit": 2500,
      "name": "postbot_calls",
      "overage": 0,
      "usage": 0
    },
    {
      "limit": 1000000,
      "name": "mock_usage",
      "overage": 0,
      "usage": 79948
    },
    {
      "limit": 15000000,
      "name": "monitor_request_runs",
      "overage": 0,
      "usage": 4493710
    },
    {
      "limit": 1000000,
      "name": "api_usage",
      "overage": 0,
      "usage": 10788
    }
  ]
}
```

**SDK Code**

```python Successful Response
import requests

url = "https://api.postman.com/me"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Successful Response
const url = 'https://api.postman.com/me';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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

```go Successful Response
package main

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

func main() {

	url := "https://api.postman.com/me"

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

	req.Header.Add("x-api-key", "<apiKey>")

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

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

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

}
```

```ruby Successful Response
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/me")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

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

```java Successful Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/me")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Successful Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/me', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.postman.com/me");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/me")! 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()
```

### Guest and Partner User Response

**Response**

```json
{
  "user": {
    "id": 12345678,
    "sub": "4d71435e-0e67-45b9-9d4c-e3262166d157",
    "username": "taylor-lee",
    "email": "taylor.lee@example.com",
    "fullName": "Taylor Lee",
    "avatar": null,
    "isPublic": true,
    "emailVerified": true,
    "teamId": 123,
    "teamName": "Test Team",
    "teamDomain": "test-team",
    "roles": [
      "user"
    ]
  }
}
```

**SDK Code**

```python Guest and Partner User Response
import requests

url = "https://api.postman.com/me"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Guest and Partner User Response
const url = 'https://api.postman.com/me';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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

```go Guest and Partner User Response
package main

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

func main() {

	url := "https://api.postman.com/me"

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

	req.Header.Add("x-api-key", "<apiKey>")

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

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

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

}
```

```ruby Guest and Partner User Response
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/me")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

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

```java Guest and Partner User Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/me")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php Guest and Partner User Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/me', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Guest and Partner User Response
using RestSharp;

var client = new RestClient("https://api.postman.com/me");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Guest and Partner User Response
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/me")! 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()
```

### No Assigned Team

**Response**

```json
{
  "user": {
    "id": 12345678,
    "sub": "4d71435e-0e67-45b9-9d4c-e3262166d157",
    "username": "taylor-lee",
    "email": "taylor.lee@example.com",
    "fullName": "Taylor Lee",
    "avatar": null,
    "isPublic": true,
    "emailVerified": true,
    "teamId": 0,
    "teamName": "",
    "teamDomain": "",
    "roles": [
      "user"
    ]
  }
}
```

**SDK Code**

```python No Assigned Team
import requests

url = "https://api.postman.com/me"

headers = {"x-api-key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript No Assigned Team
const url = 'https://api.postman.com/me';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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

```go No Assigned Team
package main

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

func main() {

	url := "https://api.postman.com/me"

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

	req.Header.Add("x-api-key", "<apiKey>")

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

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

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

}
```

```ruby No Assigned Team
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/me")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

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

```java No Assigned Team
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.postman.com/me")
  .header("x-api-key", "<apiKey>")
  .asString();
```

```php No Assigned Team
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.postman.com/me', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp No Assigned Team
using RestSharp;

var client = new RestClient("https://api.postman.com/me");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift No Assigned Team
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/me")! 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()
```