Legacy Dev Forum Posts

 View Only

Sign Up

Urgent: Facing issue while uploading fax document through api

  • 1.  Urgent: Facing issue while uploading fax document through api

    Posted 06-05-2025 18:27

    Mothilal | 2023-08-10 03:19:11 UTC | #1

    I am trying to upload fax document(pdf) through api and getting the success code with the below response

    :{"correlationId":"3c51ec65-2380-4e4e-aea9-7959bf046042"}

    but I am unable to see the uploaded document.

    Request code:

    HttpRequest req = new HttpRequest(); req.setMethod('POST'); req.setHeader('Authorization', 'Bearer ' + listApp[0].AccessToken_c); req.setHeader('content-type', HttpMultipartFormDataManager.GetContentType()); //req.setEndpoint(listApp[0].UploadDestinationURL__c); req.setEndpoint('https://apps.usw2.pure.cloud/uploads/v2/outboundfax/c047594e-e812-40f7-a148-ecb34d71bc86'); String body = ''; body += HttpMultipartFormDataManager.WriteBoundary(); body += HttpMultipartFormDataManager.WriteBlobBodyParameter('pdffile.pdf',EncodingUtil.base64Encode(contVer.VersionData), 'file1.pdf'); Blob formBlob = EncodingUtil.base64Decode(body); req.setHeader('Content-Length', String.valueOf(formBlob.size()));

    req.setBodyAsBlob(formBlob);

    Http http = new Http(); HttpResponse res = http.send(req);

    if (res.getStatusCode() == 200) { system.debug('Body::'+res.getBody()); }


    tim.smith | 2023-08-10 13:59:20 UTC | #2

    If you are getting a successful response but the server is not performing the desired action, please open a case with Genesys Cloud Care as we do not have access to your org's data to investigate via the forum.


    system | 2023-09-10 13:59:33 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: 21436