# API commands in the SmartThings Schema Cloud Connector

**URL:** <https://community.smartthings.com/t/api-commands-in-the-smartthings-schema-cloud-connector/254594>\
**Category:** Support\
**Created:** [December 23, 2022, 1:33pm UTC](https://community.smartthings.com/t/api-commands-in-the-smartthings-schema-cloud-connector/254594 "2022-12-23T13:33:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heikki\_Pirttinen](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/heikki_pirttinen/32/157743_2.png) [@Heikki\_Pirttinen](https://community.smartthings.com/u/Heikki_Pirttinen)\
**Post date:** [December 23, 2022, 1:33pm UTC](https://community.smartthings.com/t/api-commands-in-the-smartthings-schema-cloud-connector/254594/1 "2022-12-23T13:33:23Z")

</div>

I have now selected the SmartThings Schema Cloud Connector, so can I use the API commands? It doesn’t seem to accept the access Token. Does the access Token (JWT) need to be decoded before it can be used? I tried to decode, but the data is not json format.

Header:  
“alg”: ”HS384"

Payload Data:  
“47a22976-9cb6-4990-96c7-xxxxxxx:device Integral:f2256f34-a224-41fc-9822-xxxxxxxx:viper\_18099560-748f-11ed-a1b5-xxxxxxxx”

Are any of those codes an API Token? The last one seems to be App ID.

---

<div class="post-metadata">

**Author:** ![nayelyz](https://avatars.discourse-cdn.com/v4/letter/n/59ef9b/32.png) [@nayelyz](https://community.smartthings.com/u/nayelyz)\
**Post date:** [December 23, 2022, 5:12pm UTC](https://community.smartthings.com/t/api-commands-in-the-smartthings-schema-cloud-connector/254594/2 "2022-12-23T17:12:25Z")

</div>

Hi, @Heikki_Pirttinen

> [@Heikki\_Pirttinen](#):
>
> so can I use the API commands?

Which commands from the API are you trying to use?  
The ST Schema creates the device through the interaction types.  
The Access Token you get after logging in is used for the discovery and state refresh [callbacks](https://developer.smartthings.com/docs/devices/cloud-connected/interaction-types#reciprocal-access-token).

You’re not using the Schema SDK, right?

---

<div class="post-metadata">

**Author:** ![Heikki\_Pirttinen](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/heikki_pirttinen/32/157743_2.png) [@Heikki\_Pirttinen](https://community.smartthings.com/u/Heikki_Pirttinen)\
**Post date:** [December 27, 2022, 8:40am UTC](https://community.smartthings.com/t/api-commands-in-the-smartthings-schema-cloud-connector/254594/3 "2022-12-27T08:40:31Z")

</div>

I made a new topic.

> [@State refresh in the SmartThings Schema Cloud Connector](https://community.smartthings.com/t/state-refresh-in-the-smartthings-schema-cloud-connector/254809):
>
> The device status update does not take effect. Device registration is successful and I get all the Tokens and callbacks I need. By responding the “stateRefreshRequest”, I get the values of the device’s sensors added to the SmartApp. When I try to update (State refresh) the data, nothing happens. I don’t even get an respond data. If I have made mistakes in the device registration, I have always received the respond that something is wrong. When I use this callback ([https://c2c-us.smartthings.com/oauth/token](https://c2c-us.smartthings.com/oauth/token)). StateCallback doesn’t answer anything. What am I doing wrong here? I send the following data with the POST command. URL = stateCallback = [https://c2c-us.smartthings.com/device/events](https://c2c-us.smartthings.com/device/events) Data = body: { headers: { schema: "st-schema", version: "1.0", …

I tried to see if I could have used API commands, because I couldn’t get state refresh to work. How can I subscribe deviceLifecycle status changes if the API commands is not available? I need information about removing the device.

I don’t use the Schema SDK.
