Setting current mode using API integration


I’m developing an oauth integrated application and am currently working on displaying the current location’s mode, as well as providing the means of manually setting it.

Modes in general are undocumented in the API, but the JS SDK allowed me to find the way of getting the modes as well as getting and setting them. However, as I found out, I can only set the current mode using my personal access token, not the granted application token.

I’m guessing this is tied to the locations scope and would require write access, but as per the docs and as verified by myself w:locations:*’ is PAT only. Anyone know if this is officially possible and if so what is needed?

(Tagging @erickv)

Hey, @NilsiusRex

Checking this around, I noticed that the w:locations:* scope is already part of the whitelisted scopes for OAuth SmartApps, but as you mention, I couldn’t create a location mode either.

Let me reach out to our SmartApp devs to check if its availability is limited for now, or if it is an issue that should be addressed.


Indeed, @NilsiusRex there’s an issue with SmartApp Tokens and Locations. I’ve documented the reference, and as soon as I have an update, I’ll reach back to you!


Good to hear @erickv, I’m looking forward to the update. Many thanks for the swift reply!

1 Like