Homebridge create access token returns null


(Aviv Gladman) #1

New to SmartThings, hopefully i have right place to ask for help. I have been trying to install the Homebridge SmartApp but i get an invalid token on the call to createaccesstoken(). On further inspection, it returns a null. I made a simple SmartApp that only calls createaccesstoken() - ie:
def initialize() {
// Check to see if our SmartApp has it’s own access token and create one if not.
if(!state.accessToken) {
// the createAccessToken() method will store the access token in state.accessToken
log.debug "Test Token - " + state.accesstoken
and i turned on OAuth, but the log returns “Test Token - null”.

Am i missing some very obvious prerequisite to create an access token? Probably explains why a number of SmartApps won’t work for me.

Help appreciated.

(Aviv Gladman) #2

Turns out i forgot to add it to Home.