mirror of
https://github.com/mtan93/SmartThingsPublic.git
synced 2026-04-06 14:23:07 +01:00
buildActionUrl("hookCallback")
This commit is contained in:
committed by
Yaima Valdivia
parent
61398105d1
commit
4e203e8e13
@@ -281,8 +281,7 @@ def validateCurrentToken() {
|
|||||||
|
|
||||||
def initialize() {
|
def initialize() {
|
||||||
log.debug "Callback URL - Webhook"
|
log.debug "Callback URL - Webhook"
|
||||||
def localServerUrl = getApiServerUrl()
|
def hookUrl = buildActionUrl("hookCallback")
|
||||||
def hookUrl = "${localServerUrl}/api/token/${state.accessToken}/smartapps/installations/${app.id}/hookCallback"
|
|
||||||
def webhook = "https://jawbone.com/nudge/api/v.1.1/users/@me/pubsub?webhook=$hookUrl"
|
def webhook = "https://jawbone.com/nudge/api/v.1.1/users/@me/pubsub?webhook=$hookUrl"
|
||||||
httpPost(uri: webhook, headers: ["Authorization": "Bearer ${state.JawboneAccessToken}" ])
|
httpPost(uri: webhook, headers: ["Authorization": "Bearer ${state.JawboneAccessToken}" ])
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user