Unable to get URL of gateway (Content Server Web Reports From Mobile)

I am using AppWorks to generate Content Server Web Reports on the fly from a mobile device. AS per below code, unable to get otag URL and otagtoken, hence unable to upload document to Content Server without valid token.

app.run(function ($cookies, $http, $rootScope, $window) {
/** bind the url of the gateway to the $rootScope object */
$rootScope._otagUrl = ($window.otag && $window.otag.serverURL) || '';

/** configure the $http object to include the otag token in headers of all outgoing requests */
if ($window.otag && $window.otag.auth) {
    $http.defaults.headers.common.otagtoken = $window.otag.auth.otagtoken;
}
else if ($cookies.otagtoken) {
    $http.defaults.headers.common.otagtoken = $cookies.otagtoken;
}

});