                 throw e
               Utilities.sleep 1000
               count++
-
     exports.SlackApp = SlackApp


        chatPostMessage : (channelId, text , option={})=>
            @fetch_("chat.postMessage", _.extend({channel : channelId, text : text}, option))

        chatUpdate : (channelId, timestamp, text)=>
            @fetch_("chat.update", {channel : channelId, text : text, ts : timestamp})

                    code : code
            @prop.setProperty("SLACK_credencial#{@option.name}", res.getContentText())
            return JSON.parse(res.getContentText()).access_token
        getAuthorizeUrl : (callback,optArg) =>
            redirectUri = @getCallbackURL(callback, optArg)
            @prop.setProperty("SLACK_redirectURI#{@option.name}", redirectUri)
            "#{@AUTH_ENDPOINT}?client_id=#{@clientId}&scope=#{@scopes.join(',')}&response_type=code&redirect_uri=#{redirectUri}"
        getCallbackURL : (callback,optArg = {}) ->
            url = ScriptApp.getService().getUrl()
            if url.indexOf("/exec") >= 0
