---
title: {{ page_meta.name }}｜{{ group.public_title }}｜{{ site_settings.logo_alt }}
description: ビデオ通話やライブ配信を簡単に実装できるAgora SDK。名前などの情報を画面に出力するケースについて。
---

[Agora Go Real ](https://jp.vcube.com/sdk/blog)

# [{{ page_meta.name }}｜{{ group.public_title }}｜{{ site_settings.logo_alt }}](https://jp.vcube.com/sdk/blog/implementation-userid.html)

 作成者: [ブイキューブ](https://jp.vcube.com/sdk/blog/author/v-cube)｜May 16, 2022 8:05:49 AM

 

## 想定されるUIと実装方法

#### 想定UI

#### 実装方法

具体的なAPIは以下のようになります。（WebSDKの場合。NativeSDKでも同様の事が可能です。）

join methodの第２引数にuser_idを指定します。

```
client.join(<token>, user_id, null, function(uid) {
        console.log("client" + uid + "joined channel");
    }, function(err) {
        console.error("client join failed ", err);
        // Error handling
    });
    
    
```

他拠点が入室したイベントは以下で取得可能です。  
user_idが取得できるので、独自の管理システムに問い合わせる事で名前などの情報が取得できます。

```
client.on('peer-online', function(evt) {
      console.log('peer-online', evt.uid);
      //Get user information from original system
    });
    
    
```

#### シーケンス

[そのほか、最新の実装例・サンプルコード記事はこちら](https://qiita.com/v-cube)

[完全な記事を表示](https://jp.vcube.com/sdk/blog/implementation-userid.html)

```json
{
  "@context" : "http://schema.org",
  "@type" : "BlogPosting",
  "author" : {
    "@type" : "Person",
    "name" : "ブイキューブ"
  },
  "dateModified" : "2022-05-20T11:02:57.707Z",
  "datePublished" : "2022-05-16T08:05:49Z",
  "headline" : "Agora.io SDKと管理システムの連携について",
  "image" : {
    "@type" : "ImageObject",
    "height" : 592,
    "url" : "https://1970584.fs1.hubspotusercontent-na1.net/hubfs/1970584/solution/sdk/blog/implementation-userid/implementation-userid_01.png",
    "width" : 986
  },
  "mainEntityOfPage" : "https://jp.vcube.com/sdk/blog/implementation-userid.html",
  "publisher" : {
    "@type" : "Organization",
    "logo" : {
      "@type" : "ImageObject",
      "height" : 60,
      "url" : "/hs/hsstatic/content_shared_assets/static-1.4092/img/default-amp-logo.png",
      "width" : 60
    },
    "name" : "Agora Go Real"
  }
}
```