최근 검색


최근 검색 없음

Help Center logged-in user ID in custom page

답변함


2022년 11월 18일에 게시됨

Hi, I seem to be beating my head against a wall trying to be able to use the HC user id in a custom page. I know that the user object is not natively available in custom pages, but it seems I should be able to get it from somewhere else, save to a cookie, or something along those lines.  

Any magic out there? Thanks!


0

1

댓글 1개

Hi Terry,

You can make an API request to the users/me.json endpoint.

fetch("/api/v2/users/me")
.then((data) => {
  return res = data.json();
})
.then((user) => {
  console.log(user.id)
});

1


댓글을 남기려면 로그인하세요.

원하는 정보를 못 찾으셨나요?

새 게시물