Set up Guided Auth for public APIs in Postman | Postman Learning Center (2024)

You can onboard your API consumers quickly and efficiently by setting up Guided Auth for your public APIs in Postman. This feature enables you to communicate the steps users need to take to successfully make their first request to your API, such as registering for a developer account or creating an app on your dashboard. When a user creates a request to your API, Postman will automatically recognize it requires authentication and prompt them with your provided steps to set it up.

Once users set up their authentication credentials, they can use Guided Auth to securely store them in their Postman Vault as encrypted vault secrets. Postman Vault enables users to reuse stored credentials throughout their local instance of Postman. Also, vault secrets aren't synced to the Postman cloud. Learn more about using Guided Auth to store credentials as vault secrets.

API authentication setup

Guided Auth enables Postman to recognize requests to your API's base URL and prompt your API's consumers with steps to set up authentication. Your API's consumers can use Guided Auth to set up authentication to your API whether they've forked your public collection or created a request to your API from scratch.

To set up authentication for your public APIs, go to the API authorization dashboard. Select Team > Team Settings in the Postman header, then select Set up API authorization in the left sidebar.

Postman supports Bearer Token, Basic Auth, API Key, and OAuth 2.0 authorization.

It's recommended that you configure OAuth 2.0 authorization for your public APIs because it requires less setup for your API consumers.

If you need separate authentication for different endpoints on the same base URL, you can set up multiple authentication schemes for your APIs by completing the Set up API authorization form for each endpoint. It's recommended that you describe when each authentication scheme should be used, enabling your consumers to select the right option.

Set up OAuth 2.0 authentication

The following example shows you how to configure API authentication for an API that uses OAuth 2.0:

  1. Enter the base URL of your API. You'll need to verify it later to enable authorization.

    Optionally, you can use variables in your base URL to represent values, such as a subdomain, the API consumer will replace with their own values. For example, you can add a variable that represents the region, product, or organization they must substitute in the URL to make a successful call to your API: https://{{org-name}}.example.com.

  2. Select OAuth 2.0 as the authorization type.

  3. Select Authorization code as the grant type. You can learn more about specifying an authorization code.

    Set up Guided Auth for public APIs in Postman | Postman Learning Center (1)
  4. Select Generate Callback URL. Copy the URL and add it to the allow list in your application's settings.

    Set up Guided Auth for public APIs in Postman | Postman Learning Center (2)
  5. Enter the API name. Use this field to help consumers make the right choice if you decide to set up multiple authentication schemes.

  6. Enter the access token URL. This URL is the endpoint for your authentication server and will be used to obtain an access token.

  7. Enter the authorization URL. This is where users will be sent to authenticate with your API.

  8. Enter the application client ID for the application you created for this integration.

  9. Enter the application client secret for the application you created for this integration. Secrets are stored encrypted at rest and in transit, and are never visible to consumers.

  10. (Optional) Enter a comma-separated list of authentication scopes to restrict what Postman users can access. For example, read:public_key, write:org.

  11. Select to send client credentials as a Basic Auth header or in the request body.

  12. (Optional) Select Advanced settings to customize the authorization type:

    • Enter the refresh token URL. This is the endpoint for the refresh server that exchanges the refresh token for an access token. If the refresh token URL is empty, the access token URL will be used.
    • Enter custom parameters to send with auth requests, token requests, or refresh requests. For each key-value pair you define in token requests or refresh requests, choose whether you'd like to send the parameter in the request body, request URL, or request headers. Key-value pairs you define in auth requests are sent in the request URL. If you add multiple keys with same key name, they will be sent with the request as an array.
    Set up Guided Auth for public APIs in Postman | Postman Learning Center (3)
  13. Add any prerequisite steps users must take to successfully make a request to your API. This could include steps like registering for a developer account, creating an integration, or copying a token. This will be shown to users when they create a request to your API and will guide them through setting up authentication.

    Set up Guided Auth for public APIs in Postman | Postman Learning Center (4)

    You can use basic Markdown syntax for bold, italics, underline, bullet points, and links to structure your content.

  14. Verify your domain to complete adding authorization.

  15. Select Save to save your API authorization settings.

Select Try it out to preview your configuration. You can test and validate your configuration by making an API call to this endpoint.

Verify your domain

Verify your domain to prove that you're the owner, enabling Postman to trust your team and its connection to your public API. This way, you'll prevent others from impersonating your API, ensuring the safety of your consumers. Postman requires that you verify the domain for your API authentication configuration before you can share it with the Postman community.

After your domain is verified, Postman will recognize newly created requests to your API and prompt your API consumers to authenticate using the steps you've provided.

To verify your domain, do the following:

  1. Select Generate TXT Record.

  2. Select the copy icon Set up Guided Auth for public APIs in Postman | Postman Learning Center (5) to copy the TXT Record.

    Set up Guided Auth for public APIs in Postman | Postman Learning Center (6)
  3. Add the copied value to your domain as a DNS TXT record.

    Set up Guided Auth for public APIs in Postman | Postman Learning Center (7)
  4. Select Verify Domain in Postman to confirm.

Set up Guided Auth for public APIs in Postman | Postman Learning Center (2024)

FAQs

Set up Guided Auth for public APIs in Postman | Postman Learning Center? ›

API authentication setup

How do I authenticate public API? ›

Authentication is typically done by requiring the client to provide some form of credentials – such as a user name and password, an OAuth token, or a JSON Web Token (JWT). As an API owner, you can implement authentication in Apigee using policies.

How to authorize API in Postman? ›

Request authorization in Postman
  1. Use the Authorization tab of a request or collection to select an auth type and complete relevant details. ...
  2. When you create a request to a public API with Guided Auth set up, Postman will give you the option to automatically set up authorization.
Feb 6, 2024

How to implement API key based authentication? ›

To do this, you hash the api key they sent with the request. You search your database to see if the hashed api key matches a hashed api key that is stored in the database. If there is a match, then the request is valid, which means the user has permission to access that api endpoint.

How to secure a public rest API? ›

The top five ways to build security into a REST API design are:
  1. Always use TLS encryption.
  2. Implement a sound and scalable authentication and authorization model.
  3. Don't include sensitive information in URLs.
  4. Narrowly define allowed RESTful API requests and responses.
  5. Implement continuous API discovery capabilities.
Nov 15, 2023

How do I set up public key authentication? ›

The SSH public key authentication has four steps:
  1. Generate a private and public key, known as the key pair. ...
  2. Add the corresponding public key to the server.
  3. The server stores and marks the public key as approved.
  4. The server allows access to anyone who proves the ownership of the corresponding private key.
Aug 10, 2021

What is the difference between API authentication and authorization? ›

While API authentication involves verifying a user's identity, API authorization is the process of checking whether a user has the correct permissions to perform a specific task. It is often based on a user's role within an organization, which may have a predefined access level.

What is API key authentication in Postman? ›

A Postman API key tells the server that the request came from you. You can use API keys to manage and access various resources and elements you create in Postman, which enables you to integrate Postman into your development toolchain.

What is the best authentication for API? ›

Token-based authentication is one of the most secure methods of authenticating REST APIs. They minimize interception risk since they can be encrypted and are usually short-lived, and they can offer granular access control. However, tokens require careful design and infrastructure considerations.

Which three methods can be used to authenticate to an API? ›

Here are the three most common methods:
  • HTTP Basic Authentication. The simplest way to handle authentication is through the use of HTTP, where the username and password are sent alongside every API call. ...
  • API Key Authentication. ...
  • OAuth Authentication. ...
  • No Authentication.

How do I add basic authentication to API? ›

Entering your header into Apipheny
  1. In Apipheny, where it says Headers, add a new row.
  2. In the header Key, enter Authentication.
  3. In the header Value, enter Basic , followed by a space, then paste your encoded credentials.

How do you test a public API? ›

API testing flow is quite simple with three main steps:
  1. Send the request with necessary input data.
  2. Get the response having output data.
  3. Verify that the response returned as expected in the requirement.

How do I securely authenticate an API? ›

4 Secure API Authentication Methods
  1. API Keys. API Keys are secret tokens used to authenticate API requests. ...
  2. OAuth 2.0. OAuth 2.0 is an authorization protocol that gives API users access to a service without sharing their passwords. ...
  3. HTTP Authentication Schemes (Basic & Bearer) ...
  4. JWT Authentication (JSON Web Token)
Feb 1, 2023

How do you check if an API is public or private? ›

See if an API is public or private

Private APIs appear with the PRIVATE label on the SwaggerHub dashboard, in search results and on the API definition page. Note that different versions of the same API can have different visibility statuses.

Top Articles
Tax on Dividend Income: A Deep Dive into Regulations
SPYD: SPDR® Portfolio S&P 500® High Dividend ETF
Barstool Sports Gif
Www.mytotalrewards/Rtx
123 Movies Black Adam
News - Rachel Stevens at RachelStevens.com
COLA Takes Effect With Sept. 30 Benefit Payment
What Happened To Dr Ray On Dr Pol
Red Wing Care Guide | Fat Buddha Store
Craigslist Cars And Trucks Buffalo Ny
7543460065
Here's how eating according to your blood type could help you keep healthy
Big Y Digital Coupon App
Bernie Platt, former Cherry Hill mayor and funeral home magnate, has died at 90
Camstreams Download
Ktbs Payroll Login
12 Best Craigslist Apps for Android and iOS (2024)
Oriellys St James Mn
Wgu Admissions Login
How to find cash from balance sheet?
Amc Flight Schedule
Red Devil 9664D Snowblower Manual
Missed Connections Dayton Ohio
Www.publicsurplus.com Motor Pool
Crawlers List Chicago
Hannaford To-Go: Grocery Curbside Pickup
Macu Heloc Rate
Defending The Broken Isles
Scripchat Gratis
Urban Dictionary Fov
Hefkervelt Blog
Bleacher Report Philadelphia Flyers
Intel K vs KF vs F CPUs: What's the Difference?
Willys Pickup For Sale Craigslist
About Us | SEIL
Omnistorm Necro Diablo 4
The 50 Best Albums of 2023
KITCHENAID Tilt-Head Stand Mixer Set 4.8L (Blue) + Balmuda The Pot (White) 5KSM175PSEIC | 31.33% Off | Central Online
Latest Nigerian Music (Next 2020)
Search All of Craigslist: A Comprehensive Guide - First Republic Craigslist
Bcy Testing Solution Columbia Sc
Www Usps Com Passport Scheduler
Scarlet Maiden F95Zone
Craigslist Boats Dallas
Florida Lottery Powerball Double Play
Tommy Bahama Restaurant Bar & Store The Woodlands Menu
Wolf Of Wallstreet 123 Movies
877-552-2666
Myapps Tesla Ultipro Sign In
Sml Wikia
What your eye doctor knows about your health
Free Carnival-themed Google Slides & PowerPoint templates
Latest Posts
Article information

Author: Kieth Sipes

Last Updated:

Views: 6167

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Kieth Sipes

Birthday: 2001-04-14

Address: Suite 492 62479 Champlin Loop, South Catrice, MS 57271

Phone: +9663362133320

Job: District Sales Analyst

Hobby: Digital arts, Dance, Ghost hunting, Worldbuilding, Kayaking, Table tennis, 3D printing

Introduction: My name is Kieth Sipes, I am a zany, rich, courageous, powerful, faithful, jolly, excited person who loves writing and wants to share my knowledge and understanding with you.