You need to sign in to do that
Don't have an account?
Shanmuga Prasath Pushpanathan
How to add 'Authorization' as Key and 'Bearer '+'Access token' as value in the header section in Wsdl for Soap?
Getting this below error :
'System.CalloutException: Web service callout failed: Unable to find header type info fortokenRes'
'System.CalloutException: Web service callout failed: Unable to find header type info fortokenRes'
if you create named credential with endpoint ans the credential data then you have no need to add the authorization header in the code. Named credential do it from itself.
here how you can create named credential in Salesforce:
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_callouts_named_credentials.htm
regards,
Omar Rajab