Request
Basic information
| Field | Value |
|---|---|
| HTTP URL | https://api.dingtalk.io/v1.0/calendar/users/{userId}/subscribedCalendars/{calendarId} |
| HTTP Method | GET |
| Supported app types | appType-Internal app appType-Third-party enterprise app appType-Third-party personal app |
| Required permissions | permission-Calendar.Calendar.Read-Read permission for the Calendar app |
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
| x-acs-dingtalk-access-token | String | Yes | The access credential for calling this API. Obtain it as follows: - For an internal app, call the Obtain the access token of an internal app API. - For a third-party enterprise app, call the Obtain the access token of an organization that has authorized a third-party app API. - For a third-party personal app, call the Obtain a user token API. |
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
| userId | String | Yes | The unionId of the calendar author or a co-editor. - For an internal app or a third-party enterprise app, call the Query user details API to obtain the value of the unionid parameter. - For a third-party personal app, call the Obtain a user’s profile from Contacts API to obtain the value of the unionId parameter. |
| calendarId | String | Yes | The ID of the subscribed calendar. Call the Create a subscribed calendar API to obtain the value of the calendarId parameter. |
Request example
HTTPResponse
Response body
| Name | Type | Description |
|---|---|---|
| calendarId | String | The ID of the subscribed calendar. |
| name | String | The calendar title. |
| description | String | The calendar description. |
| author | String | The calendar creator. |
| managers | Array of String | The unionIds of users with edit permission. |
| subscribeScope | Object | The subscription scope. |
| unionIds | Array of String | The list of unionIds of users who can subscribe. |
| openConversationIds | Array of String | The list of OpenConversationIds of groups that can subscribe. |
| corpIds | Array of String | The list of corpIds of organizations that can subscribe. |
Response body example
Error codes
If an error is returned when you call this API, look up the solution in the Global error codes document based on the error message.| HttpCode | Error code | Error message | Description |
|---|---|---|---|
| 400 | invalidParameter | forwardErrorMessage | Invalid parameter |
| 400 | invalidParameter | calendar id cannot be null | The calendar ID cannot be empty |
| 403 | permissionDenied | permission denied | Authentication failed |