# 获取登录用户身份warning
该接口已是历史版本，建议升级到新版本 [获取登录用户身份](https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/authen-v1/authen/access_token)
通过此接口获取登录用户身份。整体流程说明请参考开发指南[应用免登概述](https://open.feishu.cn/document/uYjL24iN/ukTO4UjL5kDO14SO5gTN)。

**请求方式** ：POST<br>
**请求地址** ：https://open.feishu.cn/connect/qrconnect/oauth2/access_token/<br>
**请求 Header** ：<br>
key|value
--|--
Content-Type|application/json
**请求 Body** ：
```json
{
    "app_id":"cli_slkdjalasdkjasd",
    "app_secret":"dskLLdkasdjlasdKK",
    "app_access_token":"a-32bd8551db2f081cbfd26293f27516390b9feb04",
    "grant_type":"authorization_code",
    "code":"xMSldislSkdK",
    "refresh_token":"AtUAMvoET96LJhI97LqM0A"
}
```
**请求参数说明** :   
|参数|类型|必须|说明|
|--|-----|--|----|
|app_id|string|否|创建应用后获得|
|app_secret|string|否|创建应用后获得|
|app_access_token|string|否|（app_id + app_secret）/ app_access_token 两种方式二选一，<br>推荐使用 app_access_token|
|grant_type|string|是|此值可以为 authorization_code 或者 refresh_token 。<br>在本流程中，此值为 authorization_code|
|code|string|否|grant_type = authorization_code 时，此值必填，扫码登录后会自动302到redirect_uri并带上此参数|
|refresh_token|string|否|grant_type = refresh_token 时此值必填|  

**返回 Body** ：  
```json
{ 
    "code": 0,
    "access_token": "u-32bd8551db2f081cbfd26293f27516390b9feb04",
    "avatar_url": "www.feishu.cn/avatar/icon",
    "expires_in":1574659589,
    "name": "zhangsan", 
    "en_name": "Three Zhang",
    "open_id": "ou-caecc734c2e3328a62489fe0648c4b98779515d3",
    "tenant_key": "736588c92lxf175d",
    "refresh_expires_in": 1577244389,
    "refresh_token": "sopsILspLSEDk20s",
    "token_type": "Bearer"
}
```
**返回参数说明** : 
|参数|说明|
|-|-|
|code|返回码，0表示请求成功，其他表示请求失败|
|access_token|user_access_token，用于获取用户资源|
|avatar_url|用户头像|
|expires_in|access_token 的过期时间戳|
|name|用户姓名|
|en_name|用户英文名称|
|open_id|用户在应用内的唯一标识|
|tenant_key|当前企业标识|
|refresh_expires_in|refresh_token 的过期时间戳|
|refresh_token|刷新用户 access_token 时使用的 token|
|token_type|此处为 Bearer|