Authentication サービス
Authentication サービスを使用すると、Radian6 システムでユーザを認証できます。
応答で認証トークンが返されます。この認証トークンは、auth_token という要求ヘッダーとして後続の要求に使用します。すべての要求に auth_appkey も指定する必要があります。
1GET /socialcloud/v1/auth/authenticate| パラメータ | 型 | 説明 |
|---|---|---|
| auth_user | HeaderParam | 必須。ユーザ名が含まれる要求ヘッダー。 |
| auth_pass | HeaderParam | 必須。プレーンテキストのパスワードが含まれる要求ヘッダー。 |
| auth_token | HeaderParam | 必須。API で認証から返されるトークンが含まれる要求ヘッダー。 |
| auth_appkey | HeaderParam | 必須。アカウント固有のアプリケーションキー。 |
| fields | QueryParam | userdetails や clientattributes など、返す要素のカンマ区切りリスト。 |
例
1https://api.radian6.com/socialcloud/v1/auth/authenticate
2
3?fields=userdetails,clientattributes要求ヘッダー
1GET /socialcloud/v1/auth/authenticate HTTP/1.1
2
3Host: api.radian6.com
4
5auth_user: mikemullen
6
7auth_pass: NotARealPassword
8
9auth_appkey: NotARealAppKey応答ヘッダー
1HTTP/1.1 200 OK
2
3Date: Thu, 29 Sep 2011 17:17:16 GMT
4
5Content-Type: application/xml
6
7Content-Length: 705
8
9Keep-Alive: timeout=15, max=100
10
11Connection: Keep-Alive応答
1<auth>
2
3 <token>b65e06d1b5383...</token>
4
5 <UserDetails>
6
7 <user>
8
9 <userId>12345</userId>
10
11 <clientId>99</clientId>
12
13 <displayName><![CDATA[Mike Mullen]]></displayName>
14
15 <emailAddress>Mike.Mullen@...</emailAddress>
16
17 <timezone>GMT</timezone>
18
19 <packages></packages>
20
21 <userRoleId>1</userRoleId>
22
23 <createdDate>Jun 22, 2010 05:18 PM</createdDate>
24
25 <enabled>true</enabled>
26
27 <aihUsers><aihUser>
28
29 <userKey>84ba97...</userKey>
30
31 <registerDate>2010</registerDate>
32
33 <type>1</type>
34
35 </aihUser></aihUsers>
36
37 </user>
38
39 <avatar userId="12345"><![CDATA[http://path-to-avatar-image.jpg]]></avatar>
40
41 <Packages></Packages>
42
43 <ClientAttributes>
44
45 <attribute>
46
47 <id>12</id>
48
49 <description>IDLE_TIMEOUT</description>
50
51 <value>10800000</value>
52
53 </attribute>
54
55 ...
56
57 </ClientAttributes>
58
59 </UserDetails>
60
61</auth>