📍Ping

Endpoint to test the connectivity and basic functionality of the Hello App API.

  • HTTP Method: GET

  • Route: /public-api/v1/

Headers

  • api-key: Token generated through API key section.

Response

  • Status Code: 200 OK

  • Response Body:

{
  "message": "Welcome to the hello.app API!",
  "note": "This route is for testing purposes and does not count towards the request limit. Be sure to enjoy the experience, 'hello' and goodbye."
}

Note

  • This route is intended for testing purposes and does not contribute towards the request limit.

  • Feel free to use this endpoint to check the connectivity and basic functionality of the API.

Example

Using Fetch API:

const url = 'base_url/public-api/v1/';
const apiKey = 'your_api_key';

fetch(url, {
  method: 'GET',
  headers: {
    'api-key': apiKey,
  },
})
  .then((response) => {
    if (!response.ok) {
      throw new Error(`Network error: ${response.status}`);
    }
    return response.json();
  })
  .then((data) => {
    console.log(data);
  })
  .catch((error) => {
    console.error('There was a problem with the Fetch request:', error);
  });

Using Axios:

const axios = require('axios');

const url = 'base_url/public-api/v1/';
const apiKey = 'your_api_key';

axios.get(url, {
  headers: {
    'api-key': apiKey,
  },
})
  .then((response) => {
    console.log(response.data);
  })
  .catch((error) => {
    console.error('There was a problem with the Axios request:', error);
  });

Last updated