We have a Schema connector whose callback access token expired and can no longer be
renewed. Following the docs we set “requestGrantCallbackAccess”: true on the discovery
response, and SmartThings does send a fresh grantCallbackAccess but our accessTokenRequest
then fails, alternating between two errors within the same minute:
INVALID-CODE “the provided code is invalid”
INVALID-CODE
INVALID-CLIENT-SECRET “client secret is invalid”
INVALID-CLIENT-SECRET
INVALID-CODE
The credentials we send are identical across all of these, they are read once at process
start and do not change between requests. We send the St Client Id / St Client Secret issued
at Schema App registration, and POST to the oauthToken URL supplied in the grantCallbackAccess
payload rather than a hardcoded host.
Neither enum has a description in the Global Error Enum Types list, so:
- What causes INVALID-CLIENT-SECRET on accessTokenRequest? Can it be returned for reasons other than a genuinely wrong secret?
- Is the authorization code single-use, and what is its lifetime? If a partner returns an
error for grantCallbackAccess, does SmartThings retry with the same code or issue a new one? - Is it expected that the same credentials can yield INVALID-CLIENT-SECRET on one attempt
and INVALID-CODE on the next? - When a callback access token has expired and refresh no longer succeeds, is
requestGrantCallbackAccess the intended recovery path, or does the user have to unlink
and relink the integration?