AnsweredAssumed Answered

sugarcrm fileDownload error after upgrade

Question asked by Aravind Kumar on Feb 4, 2017
Latest reply on Feb 7, 2017 by Aravind Kumar

I received this error after I upgraded sugar7.8, Which calling my filedownload.

{"error":"need_login","error_message":"No valid authentication for user."}

After some Investigation found tht sugar upgraded the API calls for OAuth. Following is my CODE:

 api.fileDownload(api.buildURL("Quotes/" + model.get("id") + "/pdf/download?OAuth-Token=" + api.getOAuthToken()), {        success: function() {  "pdf_download_api_success", {                level: "success",                messages: SUGAR.language.get('Quotes', 'LBL_QUOTE_PDF_GENERATED'),                autoClose: true            });        },});

I checked the detials in the Following url: But I could not able to add headder to the HTTPS request can some one help?