public with sharing class FileDownload {
public Pagereference doAction() {
Pagereference newPage = new pagereference('https://<<myDomain>>/api/v1/loanadjudicate/<<externalIdValue>>/file/download');
newPage.getHeaders().put('Ocp-Apim-Subscription-Key', '<<mySubscriptionKey>>');
newPage.getHeaders().put('Content-Type', 'text');
newPage.getHeaders().put('Method', 'GET');
newPage.setRedirect(false);
return newPage;
}
}
VF: DownloadPage
Any help is appreciated!<apex:page controller="FileDownload" action="{!doAction}">
</apex:page>
3 answers
Hi Sadish,Greetings to you!Please refer to the below links which might help you further with the above issue.https://stackoverflow.com/questions/51519687/api-management-url-is-giving-missing-subscription-key-issuehttps://stackoverflow.com/questions/42467898/azure-issue-token-api-returning-access-denied-due-to-missing-subscription-keyhttps://pvandenheede.wordpress.com/2017/07/12/azure-api-management-subscription-key-invalid/https://www.tech-findings.com/2018/09/access-denied-due-to-missing.htmlI hope it helps you.Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean. Thanks and Regards,
Khan Anas