Skip to content

how to subscribe to ring intercom #1380

Answered by pikooli
pikooli asked this question in Q&A
Discussion options

You must be logged in to vote

I rethink it and did something like this :

import { RingApi } from "ring-client-api";

const ringApi = new RingApi({
  refreshToken: process.env.RING_REFRESH_TOKEN!,
});

ringApi.getLocations().then((locations) => {
  const location = locations[0];
  const intercom = location.intercoms[0];
  intercom.onDing.subscribe(() => {
    intercom.unlock();
  });
});

I didn't test it yet, will test it when I will have access to a ring intercom.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by dgreif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant