Getting started

Getting started with Hooq is easy - simply hit Login at the top of any page and either connect with one of your existing social accounts (Hooq will never post on your behalf) or register with your email address and a password.

Once registered, your 30 day trial will begin. Your trial include full access to Hooq under the developer plan.

To keep your data secure, Hooq doesn't store the payload anywhere - it simply pushes it straight to your queues.

Queues

When a webhook arrives at an endpoint, Hooq automatically pushes it to the queue configured for that webhook instantly.

Hooq attaches useful information from the request to the message, allowing you to see exactly where the request came from and any other parameters that may have been attached to the request.

Queued object
{
    body: { }, // Body object
    headers: [], //Array of headers from request
    querystrings: [] // Array of querystrings
}
Creating a queue

No matter which queing service you use, creating a queue starts the same. Jump into the queues section in Hooq and press 'New queue'

Queues - Hooq

Hooq offers a basic queueing system with a simple API and libraries to help you get setup quickly.

Simply choose 'Hooq Queue' during the queue setup wizard. You'll be provided with a QueueKey which is used to pull items off the queue later.

NodeJS

Install the 'hooq' npm package into your project

npm install hooq --save

New up a queue processor, passing in your API key and queue key

                    var hooq = require('hooq');

var queueProcessor = new hooq(
    {
        apiKey: 'Your API Key',
        queueKey: 'Your queue key'
    }
);
                    

Once everything is setup, you can start a watch - this will check the queue every 5 seconds for new items

queueProcessor.watch(
    function (webhook, done) {
        console.log("Message received!");
        console.log(webhook);
        done();
    },
    function () {
        console.log("No messages");
    },
    function (err) {
        console.log("There has been an error", err);
    }
);
                    

Learn more

.NET

Install the 'hooq' package using Nuget

Intall-Package hooq

New up a queue processor, passing in your API key and queue key and create a cancellation token source.

private static readonly QueueProcessor QueueProcessor = new QueueProcessor("APIKey", "QueueKey");
private static readonly CancellationTokenSource CancellationTokenSource = new CancellationTokenSource();

Create a queue watcher, passing in your cancellation token and HasMessageCallback.

QueueProcessor.Watch(CancellationTokenSource.Token, HasMessagesCallback, NoMessagesCallback);

Learn more

Queues - Azure

Click 'Choose' under the Azure Storage Queue heading. This will take you through the Azure specific setup wizard.

Login to the Azure Portal and jump into the storage account you wish to use. Now is the perfect time to create one if you don't have one already.

The Azure Portal will provide you with two important details; the 'Storage account name' and the 'Primary access key' - both of these are needed to let Hooq connect to Azure.

Copy + paste the values into the relevant fields in Hooq.

Enter a name for your queue. This should conform to the Azure Queue naming standards - Hooq doesn't enforce naming conventions. Any misnamed queues will still count towards your monthly quota.

Press 'Next' and your queue setup will be created.

Queues - Amazon SQS

You will need your AWS Access Keys before you can continue. We recommend that you setup access keys for Hooq. More info .

Login to the AWS Console and navigate to the SQS management page. Create a new queue if needed, otherwise choose the queue you wish to use.

Paste your AWS Access Keys into the relevant Hooq fields. Pick your queue's region, this can be figured out from the URL listed in the AWS Console. Enter your queue name and URL and press 'Create'.

Endpoints

Endpoints map up a Hooq webhook with the given queue and allow Hooq to route your message to the correct place.

Hooq currently only accepts webhooks posted using the POST method.

Creating an endpoint

Once logged into Hooq, jump into the 'Endpoints' tab and press 'New endpoint'.

Enter a useful name for the endpoint (eg Dropbox Development) and choose a queue to push data to. This can be changed later.

Press create.

Hooq will provide you with a URL to supply to the remote application asking for a webhook URL.

Response status codes
Status code Status message Description
200 OK Request has been processed by Hooq
401 Unauthorized Plan isn't currently active
404 Not found Webhook couldn't be found
429 Over limit Plan quota has been exhausted for the month
500 Server Error There has been an issue with Hooq, try again shortly

Billing

Hooq offers a fully featured 30 day trial on the Developer plan, no credit card is required to evaluate Hooq and it's features.

All plans are billed yearly to give you uninterrupted service. If you change plan during the year, you will be prorated the remaining amount of your existing plan and charged for the new plan. Your billing date and plan renewal date will be updated.

We accept Visa and MasterCard payments.

If you have any questions, please get in touch - hello@hooq.io.

Hooq Queue API

The Hooq Queue type operates over a REST API.

To fetch items off the queue, make a GET request to

https://hooq.io/out/{APIKEY}/{QueueKey}?take={NumberOfItemsToPop}&timeout={MinutesBeforeRequeue}

This will return a Hooq queue item with the following JSON structure

[
  {
    "messageid": "Unique Message Id",
    "insertiontime": "Wed, 08 Feb 2017 05:58:00 GMT",
    "expirationtime": "Wed, 15 Feb 2017 05:58:00 GMT",
    "popreceipt": "AgAAAAMAAAAAAAAAjew/EtGB0gE=",
    "timenextvisible": "Wed, 08 Feb 2017 06:03:30 GMT",
    "dequeuecount": "1",
    "messagetext": "Hooq Queued Body"
  }
]

To mark a message as done, send a DELETE request to

https://hooq.io/out/{APIKEY}/{QueueKey}/{MessageId}/{PopReceipt}

Failure to do this will cause the message to appear again after the timeout.