Legacy Dev Forum Posts

 View Only

Sign Up

Error upload document to contentmanagement

  • 1.  Error upload document to contentmanagement

    Posted 06-05-2025 18:08

    Joichs_Flores | 2017-09-21 21:34:45 UTC | #1

    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.accesstoken = responseJson['accesstoken']

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

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


    tim.smith | 2017-09-22 14:19:54 UTC | #2

    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.


    system | 2017-10-23 14:20:00 UTC | #3

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


    This post was migrated from the old Developer Forum.

    ref: 1846