Documentation for createAccessToken() and revokeAccessToken()

Last I saw was a thread where someone on staff said that these methods will be doc’d “soon” but that was November 2015. Any update? (I want these methods to store their data in atomicState, rather than state.)

1 Like

I don’t think that is possible:

“There are a few things worth noting here. First, we are using state to store our tokens. Your specific needs may be different depending on your implementation. To learn more about how state works and what your options are, visit the State - Storing Data guide.”

http://docs.smartthings.com/en/latest/cloud-and-lan-connected-device-types-developers-guide/building-cloud-connected-device-types/building-the-service-manager.html?highlight=createAccessToken

But I would be curious as to why atomicState cannot be used

@slagle ?

Why do you want it to use atomicState? Do you find you have issues with concurrency and saving an access token?

1 Like

Why??

Nothing prevents you, I think, from copying the value from State to AtomicState, but that doesn’t mean that it will always be consistent…

2 Likes

@slagle I wanted to use it because apps like the Nest Manager and ecobee (connect) are implementing oauth via atomicState. I haven’t made my own decision on which I want to use yet, but the primary concern for this post is about the lack of documentation for these functions. They’re only referenced, but never documented. If the documentation existed, I wouldn’t have to ask if they work with state vs. atomicState :slight_smile:

2 Likes