연결 해제

사용자가 Google Assistant에서 smart home 작업을 연결 해제하면 처리에서 action.devices.DISCONNECT 인텐트를 수신합니다. 이 인텐트는 Assistant가 이 사용자를 위해 더 이상 인텐트를 전송하지 않으며, 클라우드 서비스에서 기기의 Google Home Graph API 호출 (동기화 요청 및 Report State)을 중지해야 함을 나타냅니다.

요청
{
    "requestId": "ff36a3cc-ec34-11e6-b1a0-64510650abcf",
    "inputs": [{
      "intent": "action.devices.DISCONNECT",
    }]
}
JSON
{}
Node.js
const {smarthome} = require('actions-on-google');
const app = smarthome();
// ...
app.onDisconnect((body, headers) => {
  // TODO Disconnect user account from Google Assistant
  // You can return an empty body
  return {};
});
자바
@Override
public void onDisconnect(
    @NotNull DisconnectRequest disconnectRequest, @Nullable Map<?, ?> map) {
  // TODO Disconnect user account from Google Assistant
  // This function does not return anything
}

자세한 내용은 DISCONNECT 인텐트 참조 문서를 확인하세요.