> ## Documentation Index
> Fetch the complete documentation index at: https://developers.pleo.io/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Make an API Call (Postman)

export const WhatComesNext = ({children, href}) => <div className="mt-4">
    <a href={href} className="btn-primary">
      {children} →
    </a>
  </div>;

export const RememberCallout = ({title, children}) => <div className="callout-box callout-remember">
    <div className="callout-row">
      <span className="callout-icon">
        <svg width="22" height="22" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor"><path d="M229.66,98.34,172.39,155.8c11.46,22.93-1.72,45.86-10.11,57a8,8,0,0,1-12,.83L42.34,105.76A8,8,0,0,1,43,93.85c29.65-23.92,57.4-10,57.4-10l57.27-57.46a8,8,0,0,1,11.31,0L229.66,87A8,8,0,0,1,229.66,98.34Z" opacity="0.2" /><path d="M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z" /></svg>
      </span>
      <div>
        {title && <div className="callout-title">
            {title}
          </div>}
        <div className="callout-body">
          {children}
        </div>
      </div>
    </div>
  </div>;

This how-to covers making an API call using OAuth 2.0 and **Postman**. For the full non-Postman setup, where you manage the entire token lifecycle, see the [OAuth 2.0 Setup Workflow Guide](/docs/current/guides/oauth-workflow-guide) instead.

## Prerequisites

Before you begin:

* You have [configured Postman](/docs/current/how-tos/oauth-postman/how-to-configure-postman-for-oauth) for OAuth 2.0

## Steps

### 1. Create an HTTP Request

In the Postman collection where you've configured OAuth 2.0:

1. Click **New** and then select **HTTP Request**
2. Ensure that the HTTP method corresponds to the endpoint being called, for example: `GET`
3. Enter the **Staging URL** for the Pleo API you want to test, for example: `https://external.staging.pleo.io/v2/employees`

<div style={{ textAlign: "center" }}>
  <img src="https://mintcdn.com/pleo-61d4d38b/rw-misT-UerICD29/images/current/oauth-postman/oauth-postman-api-url.png?fit=max&auto=format&n=rw-misT-UerICD29&q=85&s=1834a90de0a93965d64d96665aaaa797" alt="Postman GET HTTP Request" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/oauth-postman/oauth-postman-api-url.png" />
</div>

<RememberCallout title="Remember">
  Each API endpoint has both a **Staging** and a **Production** URL. You can find these in the [Pleo API Reference](https://developers.pleo.io/reference/employees/search-for-employees) sections.

  <div style={{ textAlign: "center" }}>
    <img src="https://mintcdn.com/pleo-61d4d38b/rw-misT-UerICD29/images/current/oauth-postman/oauth-postman-api-url-endpoint-in-docs.png?fit=max&auto=format&n=rw-misT-UerICD29&q=85&s=3a56c9d6ca1036204bbacb00d29ae5c6" alt="Pleo API URLs in docs" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/oauth-postman/oauth-postman-api-url-endpoint-in-docs.png" />
  </div>
</RememberCallout>

### 2. Add authorisation

1. Click the **Authorization** tab
2. Select **OAuth 2.0** as the **Auth Type**
3. Select the OAuth 2.0 token you previously created from the **Token** dropdown menu
4. Postman automatically injects: `Authorization: Bearer <access_token>`

<div style={{ textAlign: "center" }}>
  <img src="https://mintcdn.com/pleo-61d4d38b/rw-misT-UerICD29/images/current/oauth-postman/oauth-postman-api-auth-type.png?fit=max&auto=format&n=rw-misT-UerICD29&q=85&s=ecdfb0f380c8cfd5dab63451ad56fe80" alt="Postman Auth Type" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/oauth-postman/oauth-postman-api-auth-type.png" />
</div>

### 3. Send the request

1. Click the **Send** button at the top of the screen
2. If everything is configured correctly, you should receive a JSON response

<div style={{ textAlign: "center" }}>
  <img src="https://mintcdn.com/pleo-61d4d38b/rw-misT-UerICD29/images/current/oauth-postman/oauth-postman-api-results.png?fit=max&auto=format&n=rw-misT-UerICD29&q=85&s=cc513446a829920259e8f6c878635d7d" alt="Postman Auth Type" width="100%" style={{ display: "block", margin: "0 auto" }} data-path="images/current/oauth-postman/oauth-postman-api-results.png" />
</div>

## Result

After completing these steps:

* You have successfully made a Pleo API call using OAuth 2.0 in Postman

## What Comes Next?

<WhatComesNext href="/docs/current/guides/oauth-workflow-guide-postman#3-make-a-pleo-api-call-using-postman">
  Go back to guide
</WhatComesNext>

***

<div className="text-xs uppercase" style={{ fontVariant: 'small-caps' }}>
  this how-to is part of:
</div>

<div className="mt-4 flex flex-wrap gap-2">
  <a
    href="/docs/current/guides/oauth-workflow-guide-postman"
    className="inline-flex items-center rounded-full border border-gray-300 dark:border-gray-600 
px-3 py-1 text-xs font-medium 
bg-white dark:bg-[#1f262b] text-black dark:text-white
hover:bg-gray-100 dark:hover:bg-[#2b2f33]
transition-colors"
  >
    OAuth 2.0 Setup with Postman Workflow Guide
  </a>
</div>

***

## Related Reading

* [OAuth 2.0 Setup Workflow Guide](/docs/current/guides/oauth-workflow-guide)

  Step-by-step instructions on how to configure OAuth 2.0 where you handle the full token lifecycle

***
