Inquiry Regarding "Integration Deleted" Interaction Type Behavior in SmartThings Cloud Connector

I am currently developing an ST Cloud Connector using Node.js.
For reference, I am basing my work on the following source code:
https://github.com/SmartThingsCommunity/st-schema-oauth-example/

During testing, I have encountered an unusual behavior related to Interaction Types, specifically regarding the Integration Deleted event.

According to the documentation:
https://developer.smartthings.com/docs/devices/cloud-connected/interaction-types#integration-deleted

The “Integration Deleted” event occurs when:

  1. The user deletes all devices discovered by the integration.

  2. The user removes the integration from “Linked services” on the SmartThings App.

  3. A State Callback with the "INTEGRATION-DELETED" global error is received.

However, in case #2 (when the integration is removed from “Linked services”), the ST Cloud Connector server logs show that the ST Server sends no payload in the request body.

Example (Development Server)

[2025.08.08 14:36:28] [./server.js ] :magnifying_glass_tilted_left: Request Debug: POST /sst/schema
[2025.08.08 14:36:28] [./server.js ] :magnifying_glass_tilted_left: Original URL: /sst/schema
[2025.08.08 14:36:28] [./server.js ] :magnifying_glass_tilted_left: Headers: {“host”:“oauth0623.ttt.app”,“user-agent”:“SmartThings Integration”,“content-length”:“2”, … }
[2025.08.08 14:36:28] [./routes/schema.js ] [/] req.body: {}
[2025.08.08 14:36:28] [./routes/schema.js ] [/] === SMARTTHINGS REQUEST ANALYSIS ===
[2025.08.08 14:36:28] [./routes/schema.js ] [/] No valid headers found in request
[2025.08.08 14:36:28] [./routes/schema.js ] [/] Response status: 200

Example (Production Server)

[2025.08.08 05:31:05] [./server.js ] :magnifying_glass_tilted_left: Request Debug: POST /sst/schema
[2025.08.08 05:31:05] [./server.js ] :magnifying_glass_tilted_left: Headers: {“host”:“111.11.179.180”,“connection”:“close”,“content-length”:“2”, … }
[2025.08.08 05:31:05] [./routes/schema.js ] [/] req.body: {}
[2025.08.08 05:31:05] [./routes/schema.js ] [/] === SMARTTHINGS REQUEST ANALYSIS ===
[2025.08.08 05:31:05] [./routes/schema.js ] [/] No valid headers found in request
[2025.08.08 05:31:05] [./routes/schema.js ] [/] Response status: 200

From my review of the source code, integrationDeletedHandler() in connector.js is never triggered in this case.
When I log the incoming request in schema.js, I observe that the ST Server does not send the expected JSON structure such as:

{
“headers”: {
“schema”: “st-schema”,
“version”: “1.0”,
“interactionType”: “integrationDeleted”,
“requestId”: “abc-123-456”
},
“authentication”: {
“tokenType”: “Bearer”,
“token”: “token received during oauth from partner”
}
}

Instead, when the user removes the integration from “Linked services”, the ST Server sends only:

{}
with minimal HTTP headers like:
{
“host”: “115.68.179.180”,
“connection”: “close”,
“content-length”: “2”,
“content-type”: “application/json”,
“user-agent”: “SmartThings Integration”,
“accept”: “*/*”,
“accept-encoding”: “gzip,deflate”
}

This behavior prevents the integrationDeletedHandler() from being executed.
Could you please confirm whether this is expected behavior or a potential issue on the SmartThings Server side?

Hi @baeba1

Could you please provide the following information so we can proceed with the investigation:

  1. Your Schema App ID.
  2. Confirmation of the timezone for the timestamps you provided from your logs, so we can locate the event.
  3. Support access to your account
    1.Confirm the email account registered in the forum is the same one you use for SmartThings. If not, please share it with me over DM.
    2. Enable support access to your account:
  1. Go to the SmartThings Web (my.smartthings.com)
  2. Log in to your Samsung Account
  3. Select Menu (⋮) and choose Settings
  4. Toggle on Account Data Access
  5. Select the time period and confirm - In this step, please select “Until turned off”, once the team finishes, we’ll let you know so you can disable it again.
    More info about this access here: https://support.smartthings.com/hc/en-us/articles/36170233944852-Enabling-Account-Data-Access-for-Support

Thank you for your response.

The ID I used to post on the SmartThings Community is different from the ID I am currently using for ST Cloud development.

The timezone of my current test environment is South Korea / Seoul, and I ran the test at around 10:00 local time. Please refer to the last log for details.
Schema App ID is “RoRo-2025”.

[2025.08.13 10:03:12] [./server.js ] :magnifying_glass_tilted_left: Request Debug: POST /sst/schema

[2025.08.13 10:03:12] [./server.js ] :magnifying_glass_tilted_left: Original URL: /sst/schema

[2025.08.13 10:03:12] [./server.js ] :magnifying_glass_tilted_left: Base URL:

[2025.08.13 10:03:12] [./server.js ] :magnifying_glass_tilted_left: Path: /sst/schema

[2025.08.13 10:03:12] [./server.js ] :magnifying_glass_tilted_left: Headers: {“host”:“oauth0623.ttt.app”,“user-agent”:“SmartThings Integration”,“content-length”:“2”,“accept”:“*/*”,“accept-encoding”:“gzip, br”,“cdn-loop”:“cloudflare; loops=1”,“cf-connecting-ip”:“2600:1f18:70d5:5f10:536d:4a94:96e:f735”,“cf-ipcountry”:“US”,“cf-ray”:“96e44a956af3578a-IAD”,“cf-visitor”:“{\“scheme\”:\“https\”}”,“cf-warp-tag-id”:“1e614a5e-76d0-4805-8753-67a1a19c1e5b”,“connection”:“keep-alive”,“content-type”:“application/json”,“x-forwarded-for”:“2600:1f18:70d5:5f10:536d:4a94:96e:f735”,“x-forwarded-proto”:“https”}

[2025.08.13 10:03:12] [./routes/schema.js ] [/] req.body:

{}

[2025.08.13 10:03:12] [./routes/schema.js ] [/] req.headers:

{

“host”: “oauth0623.ttt.app”,

“user-agent”: “SmartThings Integration”,

“content-length”: “2”,

“accept”: “*/*”,

“accept-encoding”: “gzip, br”,

“cdn-loop”: “cloudflare; loops=1”,

“cf-connecting-ip”: “2600:1f18:70d5:5f10:536d:4a94:96e:f735”,

“cf-ipcountry”: “US”,

“cf-ray”: “96e44a956af3578a-IAD”,

“cf-visitor”: “{\“scheme\”:\“https\”}”,

“cf-warp-tag-id”: “1e614a5e-76d0-4805-8753-67a1a19c1e5b”,

“connection”: “keep-alive”,

“content-type”: “application/json”,

“x-forwarded-for”: “2600:1f18:70d5:5f10:536d:4a94:96e:f735”,

“x-forwarded-proto”: “https”

}

[2025.08.13 10:03:12] [./routes/schema.js ] [/] req.method: POST

[2025.08.13 10:03:12] [./routes/schema.js ] [/] req.url: /

[2025.08.13 10:03:12] [./routes/schema.js ] [/] req.rawBody: {}

[2025.08.13 10:03:12] [./routes/schema.js ] [/] req.body length: 2

[2025.08.13 10:03:12] [./routes/schema.js ] [/] === SMARTTHINGS REQUEST ANALYSIS ===

[2025.08.13 10:03:12] [./routes/schema.js ] [/] No valid headers found in request

[2025.08.13 10:03:12] [./routes/schema.js ] [/] === END ANALYSIS ===

[2025.08.13 10:03:12] [./routes/schema.js ] [/] Response status: 200

[2025.08.13 10:03:12] [./routes/schema.js ] [/] Response headers: {“x-powered-by”:“Express”,“content-type”:“application/json; charset=utf-8”,“content-length”:“158”,“etag”:“W/\“9e-Icrx/v95YVECstHUxUM46SZ9qCM\””,“set-cookie”:[“connect.sid=s%3A74zL8-dEDl8N8M40AV5jYtJpsMYhMclL.678dUKY%2Fpo3jy%2FsjBb%2BCdR%2BmBb50Oh56mB9IHXsuPMU; Path=/; HttpOnly”]}

Hi @baeba1

Could you please run the following command and send me via DM the ID it returns? It should start with viper_xxxx.

smartthings schema

Additionally, please send me the email address you used to grant me access so I can validate a few details.

Hi @Itati,

Your team updated the implementation as follows:

The team says that the issue was that the endpointApp didn’t specify the schemaType.
It needed to have "schemaType": "st-schema" configured. The team has updated this and it should now work.

I tested it and confirmed that it is now working successfully.
Previously, no values were being returned in the logs, but after your team’s fix, the integrationDeleted event is being called correctly.

Thank you very much for your support.

Here are the related logs for reference:

[2025.09.03 10:26:22] [./server.js                    ] 🔍 Request Debug: POST /sst/schema
[2025.09.03 10:26:22] [./server.js                    ] 🔍 Original URL: /sst/schema
[2025.09.03 10:26:22] [./server.js                    ] 🔍 Base URL: 
[2025.09.03 10:26:22] [./server.js                    ] 🔍 Path: /sst/schema
[2025.09.03 10:26:22] [./server.js                    ] 🔍 Headers: {"host":"oauth0623.aaa.app","user-agent":"SmartThings Integration","content-length":"825","accept":"*/*","accept-encoding":"gzip, br","cdn-loop":"cloudflare; loops=1","cf-connecting-ip":"2406:da14:f66:ae0e:918a:1c85:6b2f:c37f","cf-ipcountry":"JP","cf-ray":"979175637e77e366-NRT","cf-visitor":"{\"scheme\":\"https\"}","cf-warp-tag-id":"ed9bde21-88a8-4301-bd73-12b5ed3564e0","connection":"keep-alive","content-type":"application/json","x-forwarded-for":"2406:da14:f66:ae0e:918a:1c85:6b2f:c37f","x-forwarded-proto":"https"}
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.body: 
{
  "headers": {
    "schema": "st-schema",
    "version": "1.0",
    "interactionType": "integrationDeleted",
    "requestId": "676dd718-9b2b-4fb3-a448-aa999751d5d2"
  },
  "authentication": {
    "tokenType": "Bearer",
    "token": "7gO9kVtijrM6DBKJjbOAppdF"
  },
  "callbackAuthentication": {
    "accessToken": "eyJhbGciOiJIUzM4NCJ9.ZWQwNDQ3MGMtN2ZhZi00OTQ1LWExYzUtNjk4NDIwNWJhOWNiOlJvUm8tMjAyNTpjNzNmNmZjMy00YmE4LTQ5YzktODIyZi0wMGMxYmYyMWVmMjY6dmlwZXJfNjBiYWIzMzAtNzI2Zi0xMWYwLTgxNzQtMTdmZjFjOTBjYzBiOmFwLW5vcnRoZWFzdC0x.iLbaR_HNL52sfIg_KqkoblLpdCHY7WAIbW3s8BCSB6PUn6KdisQbkeZ7HVAyTq33",
    "refreshToken": "eyJhbGciOiJIUzM4NCJ9.Yzc1ZjVkY2MtNTEwNS00OGVlLTg1MWQtOTdjZjUxYjBkN2NmOlJvUm8tMjAyNTpjNzNmNmZjMy00YmE4LTQ5YzktODIyZi0wMGMxYmYyMWVmMjY6dmlwZXJfNjBiYWIzMzAtNzI2Zi0xMWYwLTgxNzQtMTdmZjFjOTBjYzBiOmFwLW5vcnRoZWFzdC0x.z0ws0qf0qpg6sWSlFkd0XuDZy2YIXGP6GLzDRIDKoGqp_wUtGkYyC8RWj81jhrD2"
  }
}
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.headers: 
{
  "host": "oauth0623.aaa.app",
  "user-agent": "SmartThings Integration",
  "content-length": "825",
  "accept": "*/*",
  "accept-encoding": "gzip, br",
  "cdn-loop": "cloudflare; loops=1",
  "cf-connecting-ip": "2406:da14:f66:ae0e:918a:1c85:6b2f:c37f",
  "cf-ipcountry": "JP",
  "cf-ray": "979175637e77e366-NRT",
  "cf-visitor": "{\"scheme\":\"https\"}",
  "cf-warp-tag-id": "ed9bde21-88a8-4301-bd73-12b5ed3564e0",
  "connection": "keep-alive",
  "content-type": "application/json",
  "x-forwarded-for": "2406:da14:f66:ae0e:918a:1c85:6b2f:c37f",
  "x-forwarded-proto": "https"
}
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.method: POST
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.url: /
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.rawBody: {"headers":{"schema":"st-schema","version":"1.0","interactionType":"integrationDeleted","requestId":"676dd718-9b2b-4fb3-a448-aa999751d5d2"},"authentication":{"tokenType":"Bearer","token":"7gO9kVtijrM6DBKJjbOAppdF"},"callbackAuthentication":{"accessToken":"eyJhbGciOiJIUzM4NCJ9.ZWQwNDQ3MGMtN2ZhZi00OTQ1LWExYzUtNjk4NDIwNWJhOWNiOlJvUm8tMjAyNTpjNzNmNmZjMy00YmE4LTQ5YzktODIyZi0wMGMxYmYyMWVmMjY6dmlwZXJfNjBiYWIzMzAtNzI2Zi0xMWYwLTgxNzQtMTdmZjFjOTBjYzBiOmFwLW5vcnRoZWFzdC0x.iLbaR_HNL52sfIg_KqkoblLpdCHY7WAIbW3s8BCSB6PUn6KdisQbkeZ7HVAyTq33","refreshToken":"eyJhbGciOiJIUzM4NCJ9.Yzc1ZjVkY2MtNTEwNS00OGVlLTg1MWQtOTdjZjUxYjBkN2NmOlJvUm8tMjAyNTpjNzNmNmZjMy00YmE4LTQ5YzktODIyZi0wMGMxYmYyMWVmMjY6dmlwZXJfNjBiYWIzMzAtNzI2Zi0xMWYwLTgxNzQtMTdmZjFjOTBjYzBiOmFwLW5vcnRoZWFzdC0x.z0ws0qf0qpg6sWSlFkd0XuDZy2YIXGP6GLzDRIDKoGqp_wUtGkYyC8RWj81jhrD2"}}
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.body length: 825
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] === SMARTTHINGS REQUEST ANALYSIS ===
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] === END ANALYSIS ===
[2025.09.03 10:26:22] [./lib/connector.js             ] [integrationDeletedHandler] start.... 
[2025.09.03 10:26:22] [./lib/connector.js             ] [integrationDeletedHandler] accessToken: 7gO9kVtijrM6DBKJjbOAppdF
[2025.09.03 10:26:22] [./lib/db.js                    ]     [removeToken] accessToken: 7gO9kVtijrM6DBKJjbOAppdF
[2025.09.03 10:26:22] [./lib/connector.js             ] [integrationDeletedHandler] finish.... 
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] Response status: 200
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] Response headers: {"x-powered-by":"Express","content-type":"application/json; charset=utf-8","content-length":"140","etag":"W/\"8c-zzD+QSH8R1IaEoxcKSlX252slK8\"","set-cookie":["connect.sid=s%3ALX_tE-DyuAYluCjgDUZwuGyAQmCTivCh.KyGIrJpkvwcJerv3vCZkF1bPSNv1p%2B%2Fwllkajm088Ss; Path=/; HttpOnly"]}
[2025.09.03 10:26:22] [./server.js                    ] 🔍 Request Debug: POST /sst/schema
[2025.09.03 10:26:22] [./server.js                    ] 🔍 Original URL: /sst/schema
[2025.09.03 10:26:22] [./server.js                    ] 🔍 Base URL: 
[2025.09.03 10:26:22] [./server.js                    ] 🔍 Path: /sst/schema
[2025.09.03 10:26:22] [./server.js                    ] 🔍 Headers: {"host":"oauth0623.omniconnect.app","user-agent":"SmartThings Integration","content-length":"825","accept":"*/*","accept-encoding":"gzip, br","cdn-loop":"cloudflare; loops=1","cf-connecting-ip":"2406:da14:f66:ae0c:d5dc:4a5e:d22e:59b7","cf-ipcountry":"JP","cf-ray":"97917563ed77734e-NRT","cf-visitor":"{\"scheme\":\"https\"}","cf-warp-tag-id":"ed9bde21-88a8-4301-bd73-12b5ed3564e0","connection":"keep-alive","content-type":"application/json","x-forwarded-for":"2406:da14:f66:ae0c:d5dc:4a5e:d22e:59b7","x-forwarded-proto":"https"}
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.body: 
{
  "headers": {
    "schema": "st-schema",
    "version": "1.0",
    "interactionType": "integrationDeleted",
    "requestId": "676dd718-9b2b-4fb3-a448-aa999751d5d2"
  },
  "authentication": {
    "tokenType": "Bearer",
    "token": "7gO9kVtijrM6DBKJjbOAppdF"
  },
  "callbackAuthentication": {
    "accessToken": "eyJhbGciOiJIUzM4NCJ9.ZWQwNDQ3MGMtN2ZhZi00OTQ1LWExYzUtNjk4NDIwNWJhOWNiOlJvUm8tMjAyNTpjNzNmNmZjMy00YmE4LTQ5YzktODIyZi0wMGMxYmYyMWVmMjY6dmlwZXJfNjBiYWIzMzAtNzI2Zi0xMWYwLTgxNzQtMTdmZjFjOTBjYzBiOmFwLW5vcnRoZWFzdC0x.iLbaR_HNL52sfIg_KqkoblLpdCHY7WAIbW3s8BCSB6PUn6KdisQbkeZ7HVAyTq33",
    "refreshToken": "eyJhbGciOiJIUzM4NCJ9.Yzc1ZjVkY2MtNTEwNS00OGVlLTg1MWQtOTdjZjUxYjBkN2NmOlJvUm8tMjAyNTpjNzNmNmZjMy00YmE4LTQ5YzktODIyZi0wMGMxYmYyMWVmMjY6dmlwZXJfNjBiYWIzMzAtNzI2Zi0xMWYwLTgxNzQtMTdmZjFjOTBjYzBiOmFwLW5vcnRoZWFzdC0x.z0ws0qf0qpg6sWSlFkd0XuDZy2YIXGP6GLzDRIDKoGqp_wUtGkYyC8RWj81jhrD2"
  }
}
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.headers: 
{
  "host": "oauth0623.aaa.app",
  "user-agent": "SmartThings Integration",
  "content-length": "825",
  "accept": "*/*",
  "accept-encoding": "gzip, br",
  "cdn-loop": "cloudflare; loops=1",
  "cf-connecting-ip": "2406:da14:f66:ae0c:d5dc:4a5e:d22e:59b7",
  "cf-ipcountry": "JP",
  "cf-ray": "97917563ed77734e-NRT",
  "cf-visitor": "{\"scheme\":\"https\"}",
  "cf-warp-tag-id": "ed9bde21-88a8-4301-bd73-12b5ed3564e0",
  "connection": "keep-alive",
  "content-type": "application/json",
  "x-forwarded-for": "2406:da14:f66:ae0c:d5dc:4a5e:d22e:59b7",
  "x-forwarded-proto": "https"
}
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.method: POST
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.url: /
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.rawBody: {"headers":{"schema":"st-schema","version":"1.0","interactionType":"integrationDeleted","requestId":"676dd718-9b2b-4fb3-a448-aa999751d5d2"},"authentication":{"tokenType":"Bearer","token":"7gO9kVtijrM6DBKJjbOAppdF"},"callbackAuthentication":{"accessToken":"eyJhbGciOiJIUzM4NCJ9.ZWQwNDQ3MGMtN2ZhZi00OTQ1LWExYzUtNjk4NDIwNWJhOWNiOlJvUm8tMjAyNTpjNzNmNmZjMy00YmE4LTQ5YzktODIyZi0wMGMxYmYyMWVmMjY6dmlwZXJfNjBiYWIzMzAtNzI2Zi0xMWYwLTgxNzQtMTdmZjFjOTBjYzBiOmFwLW5vcnRoZWFzdC0x.iLbaR_HNL52sfIg_KqkoblLpdCHY7WAIbW3s8BCSB6PUn6KdisQbkeZ7HVAyTq33","refreshToken":"eyJhbGciOiJIUzM4NCJ9.Yzc1ZjVkY2MtNTEwNS00OGVlLTg1MWQtOTdjZjUxYjBkN2NmOlJvUm8tMjAyNTpjNzNmNmZjMy00YmE4LTQ5YzktODIyZi0wMGMxYmYyMWVmMjY6dmlwZXJfNjBiYWIzMzAtNzI2Zi0xMWYwLTgxNzQtMTdmZjFjOTBjYzBiOmFwLW5vcnRoZWFzdC0x.z0ws0qf0qpg6sWSlFkd0XuDZy2YIXGP6GLzDRIDKoGqp_wUtGkYyC8RWj81jhrD2"}}
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] req.body length: 825
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] === SMARTTHINGS REQUEST ANALYSIS ===
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] === END ANALYSIS ===
[2025.09.03 10:26:22] [./lib/connector.js             ] [integrationDeletedHandler] start.... 
[2025.09.03 10:26:22] [./lib/connector.js             ] [integrationDeletedHandler] accessToken: 7gO9kVtijrM6DBKJjbOAppdF
[2025.09.03 10:26:22] [./lib/db.js                    ]     [removeToken] accessToken: 7gO9kVtijrM6DBKJjbOAppdF
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] Response status: 500
[2025.09.03 10:26:22] [./routes/schema.js             ] [/] Response headers: {"x-powered-by":"Express","content-type":"application/json; charset=utf-8","content-length":"2","etag":"W/\"2-vyGp6PvFo4RvsFtPoIWeCReyIC8\"","set-cookie":["connect.sid=s%3ACIsyYjgWPtysJyA8BFYh8fdW2p7t_AtL.%2BVHrx0MkgUjPaudaOys%2BzYSbxtEQ6sgc6wKc9MUw9QM; Path=/; HttpOnly"]}

Great, thanks for confirming! I’m glad to hear the fix worked