Astrology Open API Integration Using Postman: Step-by-Step

Postman is a popular API development platform that offers a user-friendly environment for learning and simplifies the process of testing APIs. This article will guide you through integrating and configuring the Prokerala API in Postman to suit your requirements, mainly if you are using the Postman app for testing.

The easiest method to begin using the Prokerala API is to import our OpenAPI specification into Postman. Below are the steps to import our OpenAPI v3 specification into Postman. If you still need to install Postman, download and install it free from getpostman.com.

Importing OpenAPI Specification

1. Download the OpenAPI specification from the Prokerala API documentation: https://api.prokerala.com/docs.

Postman Tutorial Screenshot 1

2. Open the Postman application and import the OpenAPI specification file you downloaded by clicking the "Import" button in the top left corner.

Postman Tutorial Screenshot 2

Your Collections will now include a new entry named "Astrology API."

Configuring Authentication

You must configure authentication by entering your client credentials to run the imported API collections. Follow these steps:

1. Click on the three dots menu next to the "Astrology API" collection and select "Edit" from the dropdown.

Postman Tutorial Screenshot 3

2. Ensure the "Authorization" tab is selected.

3. Under "Configuration Options," change the "Grant Type" to "Client Credentials."

4. Enter https://api.prokerala.com/token as the "Access Token URL."

5. Copy your Client ID and Client Secret from the client details page on your Prokerala API dashboard. (Refer to this article [link] to learn about how to get Client Credentials.)

6. Change "Client Authentication" to "Send as Basic Auth Header."

Postman Tutorial Screenshot 4

7. Click on "Get New Access Token."

8. Click "Proceed" on the Authentication Complete screen.

9. Click "Use Token."

Now, you are all set to send API requests.

NB: The date and time should be in the ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ), for example: 2004-02-12T15:19:21+05:30.
In this format, for time zones located to the west, include a "-" to indicate the timezone; for time zones located to the east, include a "+" to indicate the timezone. For instance, Pacific Standard Time would be represented as 2004-02-12T15:19:21-08:00, while Indian Standard Time would be represented as 2004-02-12T15:19:21+05:30.

When using Postman, users typically send this parameter without URL encoding, which can lead to an error during the request. Postman interprets the "+" character as a space (" ") by default. Replacing the character "+" with its encoded value "%2B" is necessary to prevent errors and successfully make API requests.

Postman Tutorial Screenshot 5