Subscription created on a device for webhook

We have created a API_ONLY app and we are using it for authentication and webhook purpose.
After the user login, we get the installed app id and using that we are creating the subscription on a particular device.

  1. We are aware that installed app id will be valid until we logout, just in case we never logout and installed app id will always be valid then what will happen to the subscription created with that installed app id, will it expire?

  2. In case we call logout and the installed app id becomes invalid then will the subscription created still be there.

Also what is the logout url for smart things oauth

Hi, @Test_FCMS
I’m checking this with the engineering team to provide you with a more accurate answer. Once I get more info, I’ll let you know.

Sure, Please do

Hi, @Test_FCMS
Following up, this is the feedback provided by the engineering team:

  1. A subscription is valid until it is explicitly deleted or its installedApp instance is removed.
  2. There’s not a specific URL to “log out”. Once a user authorizes access to your API Access app, it is considered a “linked service” which can be removed when:
    a. The user goes to the settings in the app > Linked Services and removes your app
    b. You or the user call the instaleldApps endpoint to remove the instance (see here). In this case, once the installedApp is deleted, it will disappear from “Linked Services”.

So, in case you want to provide an option for the user to remove the authorization access to your app, you can provide a button (or something similar) that helps them perform the call to delete the installedApp.