Request
| Basic Information | |
|---|---|
| HTTP URL | https://api.dingtalk.io/topapi/attendance/group/get |
| HTTP Method | POST |
| Supported app type | appType-Internal app |
| Required permission | permission-qyapi_attendance_group_read-Attendance group read permission |
Query Parameters
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| access_token | String | Yes | 4c9ebd2b1534xxxx | The App credential used to call this API. Obtain it by calling Get the access_token of an Internal App. |
Request Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| op_userid | String | No | user123 | The user ID of the operator. |
| group_key | String | Yes | 02B1Exxxx | The attendance group groupKey. Note If your attendance group identifier is group_id, call Convert groupId to groupKey to convert group_id to group_key. |
Request Example
curl -X POST "https://api.dingtalk.io/topapi/attendance/group/get" \
-H 'Content-Type:application/x-www-form-urlencoded;charset=utf-8' \
-d 'access_token=9d319xxxx6e5f0' \
-d 'group_key=0151E0xxxx2A1A917' \
-d 'op_userid=123456'
DingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/group/get");
OapiAttendanceGroupGetRequest req = new OapiAttendanceGroupGetRequest();
req.setOpUserid("123456");
req.setGroupKey("0151E022xxxxx1A917");
OapiAttendanceGroupGetResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());
import dingtalk.api
req=dingtalk.api.OapiAttendanceGroupGetRequest("https://api.dingtalk.io/topapi/attendance/group/get")
req.op_userid="123456"
req.group_key="0151E02xxxxA1A917"
try:
resp= req.getResponse(access_token)
print(resp)
except Exception,e:
print(e)
include "TopSdk.php";
date_default_timezone_set('Asia/Shanghai');
$c = new DingTalkClient(DingTalkConstant::$CALL_TYPE_OAPI, DingTalkConstant::$METHOD_POST , DingTalkConstant::$FORMAT_JSON);
$req = new OapiAttendanceGroupGetRequest;
$req->setOpUserid("123456");
$req->setGroupKey("0151Exxxx1A917");
$resp = $c->execute($req, $access_token, "https://api.dingtalk.io/topapi/attendance/group/get");
IDingTalkClient client = new DefaultDingTalkClient("https://api.dingtalk.io/topapi/attendance/group/get");
OapiAttendanceGroupGetRequest req = new OapiAttendanceGroupGetRequest();
req.OpUserid = "123456";
req.GroupKey = "0151E0xxxxA1A917";
OapiAttendanceGroupGetResponse rsp = client.Execute(req, access_token);
Console.WriteLine(rsp.Body);
Response
Response Body
| Name | Type | Example | Description |
|---|---|---|---|
| result | Object | The attendance group information result. | |
| name | String | Test attendance group 1 | The attendance group name. |
| ext | String | Extension field in JSON format. | |
| location_offset | Number | 100 | The clock-in range, in meters. Note This field is deprecated. Use the offset returned by Batch Query Locations instead. |
| group_key | String | 0151E0223B1EDDDF00DD6B7F72A1A917 | The attendance group groupKey. |
| enable_face_check | Boolean | false | Whether smile clock-in is enabled. - true: On - false (default): Off |
| enable_face_beauty | Boolean | false | Whether the beauty filter is enabled. - true: On - false (default): Off |
| enable_camera_check | Boolean | false | Whether photo clock-in is enabled. - true: On - false (default): Off |
| enable_outside_check | Boolean | false | Whether field clock-in is allowed. - true: Allowed - false (default): Not allowed |
| enable_outside_apply | Boolean | false | Whether field clock-in requires approval. - true: Required - false (default): Not required |
| outside_check_approve_mode | Number | 0 | The approval mode for field clock-in. - -1 (default): Off - 0: Approve first, then clock in - 1: Clock in first, then approve |
| enable_outside_remark | Boolean | false | Whether field clock-in requires a remark. - true: Required - false (default): Not required |
| enable_outside_camera_check | Boolean | false | Whether field clock-in requires a photo remark. - true: Required - false (default): Not required |
| forbid_hide_outside_address | Boolean | true | Whether employees are prohibited from hiding the detailed address. - true (default): Prohibited - false: Not prohibited |
| enable_outside_update_normal_check | Boolean | false | Whether field clock-in records can update regular clock-in records. - true: Allowed - false (default): Not allowed |
| enable_trim_distance | Boolean | false | Whether location distance fine-tuning is allowed. - true: Allowed - false (default): Not allowed |
| trim_distance | Number | 50 | The location fine-tuning range, in meters. |
| errmsg | String | ok | The returned error message. |
| success | Boolean | true | Whether the request succeeded. - true: Success - false: Failed |
| errcode | Number | 0 | The error code. |
Response Body Example
{
"result":{
"ext":"",
"enable_camera_check":false,
"enable_face_beauty":false,
"outside_check_approve_mode":0,
"forbid_hide_outside_address":true,
"enable_face_check":false,
"enable_outside_apply":false,
"enable_outside_camera_check":false,
"enable_outside_update_normal_check":false,
"trim_distance":50,
"enable_outside_check":false,
"location_offset":100,
"enable_outside_remark":false,
"name":"Test attendance group 1",
"group_key":"0151E0223B1EDDDF00DD6B7F72A1A917",
"enable_trim_distance":false
},
"errcode":0,
"success":true,
"errmsg":"ok"
}