Device handler with oauth2

Hi! I have a heat pump which is connected to the manufacturers web service ( I can view the pumps parameters there (temp, compressor speed and so on). These parameters is accessible via an RESTful API from the manufacturer aswell. The API grants access via oauth2 and then the parameters is accessible with simple API calls. The API needs me to specify a callback url and gives me my clientId and secret.

Since my programming skills is poor, i need some help on the way:

  1. Is it possible to write this as a single device handler or do I need to write a service handler SmartApp and a device handler?

  2. Is there any complete code somewhere which does this which i could try to alter to get it to work? I’ve tried the Lockitron app by dkirker but the callback url in that app is not fixed. I’ve seen the Arlo camera connect with a web login directly from the device handler but i can’t find that code.

I know it might seem hopeless trying to help me when I’m not experienced but I’m willing to put a lot of time into this and would be really grateful for your help.