You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add includesOwnedAudienceGroups Parameter to Audience API (#800)
line/line-openapi#105
# Enhancement to Shared Audiences API
This PR introduces a new query parameter `includesOwnedAudienceGroups`
to the `/v2/bot/audienceGroup/shared/list` endpoint in the Business
Manager API. This enhancement allows users to specify whether to include
audience groups owned by the user in the response.
## Changes Made
- Added the `includesOwnedAudienceGroups` parameter to the API endpoint.
- **Type**: Boolean
- **Default**: false
- **Description**:
- `true`: Include audience groups owned by the LINE Official Account
Manager.
- `false`: Respond only with audience groups shared by Business Manager.
- Removed the `/v2/bot/audienceGroup/{audienceGroupId}/activate` and
`/v2/bot/audienceGroup/authorityLevel` endpoints.
## Purpose
This update provides more flexibility in retrieving audience groups by
allowing users to filter based on ownership. It is especially useful for
users who manage both shared and owned audience groups. The removal of
certain endpoints is part of a cleanup effort to streamline the API.
Please review the changes and let me know if there are any questions or
further modifications needed.
## Documents and Reference
- [Get List of Shared
Audiences](https://developers.line.biz/en/reference/messaging-api/#get-shared-audience-list)
- [Removed
Endpoints](https://developers.line.biz/en/news/2025/03/26/cross-targeting-closing/)
For more information, please refer to the links provided above.
Co-authored-by: github-actions <[email protected]>
**audience_group_id** | **int**| The audience ID. |
73
-
74
-
### Return type
75
-
76
-
void (empty response body)
77
-
78
-
### Authorization
79
-
80
-
[Bearer](../README.md#Bearer)
81
-
82
-
### HTTP request headers
83
-
84
-
-**Content-Type**: Not defined
85
-
-**Accept**: Not defined
86
-
87
-
### HTTP response details
88
-
| Status code | Description | Response headers |
89
-
|-------------|-------------|------------------|
90
-
**202** | Accepted | - |
91
-
92
-
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
@@ -540,77 +465,6 @@ Name | Type | Description | Notes
540
465
541
466
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
@@ -775,7 +629,7 @@ Name | Type | Description | Notes
775
629
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
@@ -819,9 +673,10 @@ with linebot.v3.audience.ApiClient(configuration) as api_client:
819
673
status = linebot.v3.audience.AudienceGroupStatus() # AudienceGroupStatus | The status of the audience(s) to return. If omitted, the status of the audience(s) will not be used as a search criterion. (optional)
820
674
size =20# int | The number of audiences per page. Default: 20 Max: 40 (optional)
821
675
create_route = linebot.v3.audience.AudienceGroupCreateRoute() # AudienceGroupCreateRoute | How the audience was created. If omitted, all audiences are included. `OA_MANAGER`: Return only audiences created with LINE Official Account Manager (opens new window). `MESSAGING_API`: Return only audiences created with Messaging API. (optional)
676
+
includes_owned_audience_groups =False# bool | true: Include audienceGroups owned by LINE Official Account Manager false: Respond only audienceGroups shared by Business Manager (optional) (default to False)
print("The response of ManageAudience->get_shared_audience_groups:\n")
826
681
pprint(api_response)
827
682
exceptExceptionas e:
@@ -838,6 +693,7 @@ Name | Type | Description | Notes
838
693
**status** | [**AudienceGroupStatus**](.md)| The status of the audience(s) to return. If omitted, the status of the audience(s) will not be used as a search criterion. | [optional]
839
694
**size** | **int**| The number of audiences per page. Default: 20 Max: 40 | [optional]
840
695
**create_route** | [**AudienceGroupCreateRoute**](.md)| How the audience was created. If omitted, all audiences are included. `OA_MANAGER`: Return only audiences created with LINE Official Account Manager (opens new window). `MESSAGING_API`: Return only audiences created with Messaging API. | [optional]
696
+
**includes_owned_audience_groups** | **bool**| true: Include audienceGroups owned by LINE Official Account Manager false: Respond only audienceGroups shared by Business Manager | [optional][default to False]
841
697
842
698
### Return type
843
699
@@ -859,79 +715,6 @@ Name | Type | Description | Notes
859
715
860
716
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
[[Back to top]](#)[[Back to API list]](../README.md#documentation-for-api-endpoints)[[Back to Model list]](../README.md#documentation-for-models)[[Back to README]](../README.md)
0 commit comments