Quick Start
Note: Make sure you already have the API Key and Access Token required to make API requests. If not, you can generate a new API Key and Access Token by signing up for a trial subscription. You will also need the Postman tool which you can get free from here.
STEP 1
Initial Setup
Open Postman on your computer.
Select the HTTP method as POST. We are going to use this API - /find-nivas-and-shool
Copy the full API URL and paste as below
STEP 2
Add Authentication
Go to the Auth tab of Postman.
Since all the APIs use Basic Auth, we will use Basic Auth from the Type select box.
Now, enter the Access Token.
STEP 3
Add Request Parameters / Birth Details
Now, go to the Body tab of Postman.
Follow the request parameters from the API doc and add them one by one as shown below:
STEP 4
Send Request
Once you have set up everything as mentioned above, you can call the API using the Send button. You will receive a response in JSON format as shown below.
Get your API keys
Your API requests are authenticated using API key and Authorization Token. Any request that doesn't include an API key or Token will return an error.
You can generate an API Access Token from your Dashboard at any time.
Make your first request
To make your first request, send an authenticated request to the find nakshatra endpoint. This will return you data for nakshatra
, which is nice.
Find nakshatra.
POST
https://astro.divineapi.com/indian-api/v1/find-nakshatra
Returns nakshatra details in response.
Headers
Name | Type | Description |
---|---|---|
Authorization* | String | your API Access Token eg: Bearer {token} |
Request Body
Name | Type | Description |
---|---|---|
year* | Integer | year of panchang, eg: 2023 |
api_key* | String | your API key |
month* | Integer | month of panchang, eg: 04 |
day* | Integer | day of panchang, eg: 04 |
tzone* | Float | timezone, eg: 5.5 |
lat* | Float | latitude, eg: 16.70499 |
lon* | Float | longitude, eg: 74.24325 |
Note: The API find-nakshatra allows users to find past and future matches based on a specified date. The response includes a list of past and future matches, each with a start and end time.
Take a look at how you might call this method via cURL, NodeJS or JavaScript jQuery AJAX
:
Last updated