Scheduling callbacks

How did we do?

This guide will walk you through configuring a callback to be scheduled at a later date.

Before you begin

Before you are able to schedule callbacks, you'll need to meet the domain verification requirements as outlined in Domain Verification. Once you have a verified domain you can use that operates a web server listening on HTTPS, you can continue with the rest of this guide.

Determine the target time

You need to determine when you want the callback to be made. For the purposes of testing scheduling in this guide, you can retrieve the current UNIX timestamp from Unix Timestamp. Since this will show the current UNIX timestamp, you should add the number of seconds into the future you want the callback to be scheduled.

Most programming languages support retrieving a past, current or future time as a UNIX timestamp which you can use when registering the callback.

Schedule the callback

You can now schedule the callback with HiveMP Scheduling. Make a request to the PUT /schedule endpoint with the required information:

curl -s \
  -H "X-API-Key: $apiKey" \
  -H "Accept: application/json" \
  -H "Content-Length: 0" \
  -X PUT \
  "https://scheduling-api.hivemp.com/v1/schedule"\
"?scheduleUtc=TARGET_UNIX_UTC_TIMESTAMP"\
"&callbackUrl=https%3A%2F%2Freplacewithyourdomain.com%2Fpath%3Fquery%3Dstring"

After executing this method, you'll receive a copy of the scheduled callback information:

{
  "callbackUrl": "https://replacewithyourdomain.com/path?query=string",
  "scheduleUtc": "TARGET_UNIX_UTC_TIMESTAMP"
}