API Guide - Fetch Domains and Read Mail

Fetch Domain List

This API allows you to fetch the list of valid domains configured with MX records matching the current server. If the api parameter is used, you can retrieve the private domains of the account.

Endpoint

GET https://vndya.com/api/get_domains.php

Parameters

Request Example

Request Example GET:

https://vndya.com/api/get_domains.php?api=

Response Format

The API returns data in JSON format with the following fields:

Response Example

Response when fetching the public domain list.:

Note: If no valid domains are available, data will be an empty array. If api is invalid, the API will return a 403 error with status as false and message as an error message (e.g., "Invalid API Key").

API Information

This API allows you to fetch a list of emails based on the destination email address (to_field). The returned data includes email information and codes (if any) extracted from the subject or content.

GET https://vndya.com/api/get_mail.php

Parameters

Note: If both hour and day are provided, the API prioritizes hour. If neither is provided, the API returns the 10 most recent emails.

Request Example

Request Example GET:

https://vndya.com/api/get_mail.php?apikey=21e30177f39325eb8ee0f1ed5a94987b&email=user@example.com

Response Format

The API returns data in JSON format with the following fields:

Each successful request results in status: true. The total number of requests will decrease by 1.

Response Example

The API returns JSON data:

Note: The html_content is truncated in the example. Actual data will include the full HTML of the email. If no emails are found, data will be an empty array and status will be false.

Using the API with C#

Example using HttpClient in C# to call the API and extract the code:

JSON data is retrieved, and the code is printed to the console if the request is successful.

Note: Ensure you have installed the Newtonsoft.Json package. You can install it via NuGet with the command: dotnet add package Newtonsoft.Json.

Using the API with Python

Example using requests in Python to call the API and extract the code:

JSON data is retrieved, and the code is printed as a list if the request is successful.

Note: Ensure you have installed the requests library. You can install it via pip with the command: pip install requests.