Skip to main content
Peyton Hunt preguntó en #Flow

I am trying to create HTTP Callout actions in a flow.     My organization has recently started using a new training platform (TalentLMS) that exposes an API, and I want to be able to bring course data into Salesforce. We have certain automations running on training courses that we want to migrate to the new system and be able to track in the same way - without using a connector like Zapier. I thought HTTP Callout actions could help me with this issue.     However, the connection requires the API Key as well as Username and Password to authenticate. I've looked through SF documentation around Named/External Credentials, but I am stuck on how to set it up. Username/Password requires Basic Authentication, whereas API Key requires Custom authentication.     I tried using custom headers to store all of these - but when I go to use the credential in my flow, it says I have an invalid API key. I know the key is correct, I think I am configuring it incorrectly, but I don't know how to fix it!    I am using these as custom headers - API_Key: {!$Credential.TalentLMS.API_Key} and Authorization: {!'Basic ' & BASE64ENCODE(BLOB($Credential.TalentLMS.Username & ':' & $Credential.TalentLMS.Password))}      Any help would be appreciated! Please do not respond with data connectors - my goal is to create the callout action without needing one (if possible). 

2 respuestas
  1. Sushil Kumar (UKG) Forum Ambassador
    14 ene, 2:57 a.m.
    Couple of things to try 1.Try making api call from postman first and see if it’s working with both headers. 2. Try running api call from sample apex code using same named credentials. Your setup seems accurate, still see this article and see if it helps. This article only lists one header, but you can add more headers as needed. - https://medium.com/@sfdcsushil/connecting-to-external-api-from-salesforce-using-external-credentials-with-custom-header-option-4a7820c9d02a