Error upload document to contentmanagement

Hello

I have a problem with load files to contentmanagement. This is response from API

HTTP response body: {"status":400,"code":"bad.request","message":"Create document metadata: Cannot find user ID: 4b5b5b51-1ac7-4f33-afe5-XXXXXXXX","messageParams":{},"contextId":"bde0b98d-6f2e-4813-859d-b7fed6e8e06e","details":[],"errors":[]}

The code is:

import PureCloudPlatformClientV2
PureCloudPlatformClientV2.configuration.access_token = responseJson['access_token']

body = PureCloudPlatformClientV2.DocumentUpload()
body.name= "pruebadoc";
body.workspace ={"id":"e75f0c08-33c2-4bf0-9a32-78b020eeeeb1"}
copySource = ""
moveSource = ""
override = 1

api = PureCloudPlatformClientV2.ContentManagementApi()
result = api.post_contentmanagement_documents(body)

The content management APIs are not available for use with a client credentials auth token. You must use a user OAuth flow (token, implicit, or saml) to use the content management APIs. I've opened CM-3889 to have the CM APIs explicitly check for client credentials and return an appropriate error if they are used.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.