the part of get_analytics_reporting_exports_metadata() throws an error of "TypeError: can only concatenate str (not "PermissionCollectionEntityListing") to str".
import PureCloudPlatformClientV2
from PureCloudPlatformClientV2.rest import ApiException
from pprint import pprint
# >> START oauth-client-credentials-step-1
CLIENT_ID = 'xx'
CLIENT_SECRET = 'xx'
ENVIRONMENT = 'xx' # eg. mypurecloud.com
region = PureCloudPlatformClientV2.PureCloudRegionHosts.us_west_2
PureCloudPlatformClientV2.configuration.host = region.get_api_host()
apiclient = PureCloudPlatformClientV2.api_client.ApiClient().get_client_credentials_token(CLIENT_ID,
CLIENT_SECRET)
authApi = PureCloudPlatformClientV2.AuthorizationApi(apiclient)
# Configure OAuth2 access token for authorization: PureCloud OAuth
PureCloudPlatformClientV2.configuration.access_token = authApi.get_authorization_permissions()
# or use get_client_credentials_token(...), get_saml2bearer_token(...) or get_code_authorization_token(...)
# create an instance of the API class
api_instance = PureCloudPlatformClientV2.AnalyticsApi()
try:
# Get all view export requests for a user
api_response = api_instance.get_analytics_reporting_exports_metadata()
pprint(api_response)
except ApiException as e:
print("Exception when calling ConversationsApi->get_analytics_conversations_details: %s\n" % e)