             for sub in subs
                 result.registeredTopics.push(sub.event.name.split("|")[0])
 
-            result.webCourierURL = "https://" + request.headers.host + "/webcourier"
-            if (cb)
-                cb(result)
+            result.webCourierURL = "https://" + req.headers.host + "/webcourier"
+            res.json result
 
 
 exports.setup  = (app, createSubscriber, getEventFromId, authorize, testSubscriber, eventPublisher, getSubscriberFromId) ->

                for sub in subs
                    result.registeredTopics.push(sub.event.name)

                result.webCourierURL = "https://" + request.headers.host + "/webcourier"
                res.json result, if result? then 200 else 404
            else
                logger.error "No subscriber #{req.subscriber.id}"

                                eventName = eventName + "|" + req.param("steedosId").replace("@", "_").replace(".", "_")
                            events[eventName] = {}
                        subscriber.addSubscriptions events, (r) ->
                            generateResponse(req, res, subscriber)

        catch error
            logger.error "Creating token failed: #{error.message}"
