Getting an access token through oAuth2 for new APIs & notifications of state changes

Hello.

I am building a web service that uses smart things APIs.

  1. Is it possible to get an access token and a refresh token via oAuth2 authorization code flow? The only way to use the new API (https://api.smartthings.com) is getting the personal access token from https://account.smartthings.com/tokens. I want to get tokens through typical the oAuth2 flow.

  2. I want to be notified when states of devices are changed via WebHook. Is there any related APIs? For example, if a user has a temperature sensor and the sensor gets new temperature value, it will update its state and the user can see it on the smart things application. In this case, is it possible to get the changes on my server instead of polling devices periodically?

Thanks for reading.