Hive OTP Verification System offers an API consisting of Send OTP and Verify OTP to apply the OTP verification to games.

URL

Server URL
Production https://otp.qpyou.cn
Sandbox https://sandbox-otp.qpyou.cn

 


Authentication

To implement the API which Hive OTP Send system provides, an authorization token (API KEY) is required. The authentication token is automatically issued after your game registers on AppCenter. Authorization token, which follows JWT (JSON Web Token: https://jwt.io) specification, doesn’t limit the expiry time, so it is available to keep using this token.

 


Send OTP

Send OTP SMS

Method POST
URL /otp/sms
  • Request Header
    Field Type
    Content-Type application/json
    Authorization bearer {API KEY}
    Topic Hive Console > Notification > SMS OTP > Sending Information Settings > Registration or Modification > Sending ID
  • Request Body
    Field Type Required Description
    to String O The receiver’s phone number
    toCountryNo String O The receiver’s country code
    retry Boolean X This field indicates the existence of your trial to send OTP SMS to the same receiver via this API. If this field is left empty, it is set to true if this API was called more than once for the same receiver within the last 5 minutes, and set to false if not.
    lookup Boolean X This field indicates whether to verify to is in valid format for a phone number, and the default values is false. If it is true, the API response time would approximately be 250ms ~ 2000ms due to the verification process, and normally within 200ms if it is false.
    lang String X This is language code, and the default value is en.

      the valid language codes:

    • ko
    • en
    • ja
    • zh-cn
    • zh-tw
    • zh-hans
    • zh-hant
    • de
    • fr
    • ru
    • es
    • pt
    • id
    • th
    • vi
    • it
    • tr
    • ar
  • Response Header
    Field Type
    Content-Type application/json
  • Response Body
    Field Type Description
    otp String OTP number
    provider String SMS provider
    expiry String OTP validity time
  • Request Sample
  • Response Sample

Send OTP email

Method POST
URL /otp/email
  • Request Header
    Field Type
    Content-Type application/json
    Authorization bearer {API KEY}
    Topic Hive Console > Notification > SMS OTP > Sending Information Settings > Registration or Modification > Sending ID
  • Request Body
    Field Type Required Description
    sender String O Sender’s email address
    senderName String O Sender’s name on email
    receiver String O Receiver’s email address
    subject String O Email title
    lang String X This is language code, and the default value is en.

      the valid language codes:

    • ko
    • en
    • ja
    • zh-cn
    • zh-tw
    • zh-hans
    • zh-hant
    • de
    • fr
    • ru
    • es
    • pt
    • id
    • th
    • vi
    • it
    • tr
    • ar
  • Response Header
    Field Type
    Content-Type application/json
  • Response Body
    Field Type Description
    otp String OTP number
    expiry String OTP validity time
  • Request Sample
  • Response Sample

 


Verify OTP

Method POST
URL /otp/verify
  • Request Header
    Field Type
    Content-Type application/json
    Authorization bearer {API KEY}
    Topic Hive Console > Notification > SMS OTP > Sending Information Settings > Registration or Modification > Sending ID
  • Request Body
    Field Type Required Description
    toCountryNo String X Received country code (Required if OTP is received via SMS)
    to String X Received phone number (Required if OTP is received via SMS)
    receiver String X Received email address (Required if OTP is received via email)
    otp String O Received OTP
  • Response Header
    Field Type
    Content-Type application/json
  • Response Body
    Field Type Desctiprion
    result boolean OTP verification result
  • Request Sample 1
  • Request Sample 2
  • Response Sample