Gmail OTP Receiver

Retrieve real-time OTP verification codes from Gmail accounts. Returns the latest OTP and full receive history — all routed through the HS-Nexus secure gateway.

Real-Time OTP Fetch

Instantly queries the inbox and returns the latest verification code.

Full OTP History

Returns up to 20 previously received OTPs with timestamps.

Zero Data Leakage

No supplier names, URLs, or internal identifiers in any response.

Payload Parameters

POST
https://api.hsmail.shop/v1/gmail/otp
Headers:Authorization: (Not Set - Set in Topbar)

Result Codes

OTP_FOUND

OTP was successfully retrieved and is available in latestOtp.

WAITING

No OTP has arrived yet. The inbox is being monitored.

HISTORY_ONLY

Live check unavailable, but saved history is returned.

NO_DATA

No OTP data found for this account in history.

Example Response

{
  "status": "success",
  "data": {
    "email": "example@gmail.com",
    "orderId": "v2xxxxxxxxxxxxxx",
    "result": "OTP_FOUND",
    "latestOtp": "847291",
    "totalReceived": 3,
    "history": [
      { "id": "uuid-1", "otpCode": "847291", "receivedAt": "2026-04-29T03:20:00.000Z" },
      { "id": "uuid-2", "otpCode": "521043", "receivedAt": "2026-04-28T18:45:12.000Z" },
      { "id": "uuid-3", "otpCode": "903714", "receivedAt": "2026-04-28T14:22:33.000Z" }
    ]
  }
}

Implementation Snippets

curl -X POST https://api.hsmail.shop/v1/gmail/otp \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"email":"example@gmail.com","orderId":"v2xxxxxxxxxxxxxx"}'