Postman is a powerful tool for testing and working with APIs. In this article, we will walk you
through the process of sending an API request using Postman specifically for an OBD (Outbound
Dialing) service. We will cover how to set the URL, add headers, and include a JSON body in the
request. Let's get started!
Prerequisites
Before we begin, make sure you have Postman installed on your computer. You can download it
from the official website if you haven't already: https://www.postman.com/downloads/
Step 1: Launch Postman
Once you have Postman installed, open the application.
Step 2: Create a New Request
To create a new request, click on the "New" button in the top-left corner of the Postman window. You
can choose to create a new request in a collection or as a standalone request. For this example, we
will create a standalone request.
Step 3: Set the Request Details
Request Method and URL
In the request window, select the HTTP method you want to use. In this case, it's likely a
POST request.
In the URL field, enter the OBD API URL you want to send a request to. It should look
something like this: `https://DomainNumber:Port/fe/api/v1/sendObd`
Headers
Click on the "Headers" tab to add the necessary headers to your request.
You mentioned two headers: "Content-Type" and "Authorization."
To add the "Content-Type" header, click on the "Key" column and enter "Content-Type." In the
"Value" column, enter "application/json."
To add the "Authorization" header, click on the next row in the "Key" column and enter
"Authorization." In the "Value" column, enter "Base64 string" as the value.
Note: To learn how to create a Base64 string, please read the full article.
Body
Click on the "Body" tab to add the JSON body to your request.
In the body section, select the "raw" option.
Copy and paste the following JSON content into the text box:
{
"cli": "ANY",
"msisdns": [{
"recipient": "YOUR_PHONE_NUMBER"
}],
"totalRetries": 1,
"ivrFlows": "voice",
"retryInterval": 15,
"voice": {
"voiceFileName": "YOUR_MP3_FILE_NAME"
}}
Your request should now be properly configured with the OBD API URL, headers, and body.
Step 4: Send the Request
To send the request, simply click the "Send" button located to the right of the URL field. Postman
will send the request to the specified OBD API endpoint.
Step 5: Viewing the Response
After sending the request, you will see the response from the OBD API displayed in the lower part of
the Postman window. This will include the HTTP status code, headers, and the response body.
And that's it! You've successfully sent an API request using Postman with headers and a JSON
body for your OBD service. This article should help you understand the process step by step. Feel
free to explore more of Postman's features to enhance your API testing and development
experience. Happy testing!
How to Generate a Base64 String Using Base64Encode.org
Open the website: https://www.base64encode.org/
Note : Use api credentials to get the Base64 String generated.