You need to sign in to do that
Don't have an account?
Josh Harrison 7
Provisioning auth provider and/or named credential through code
Hi, I'm very new to Salesforce development. I'm looking for a way to provision auth providers and named credentials through code. I originally posted my question on the general helps site: https://success.salesforce.com/answers?id=9063A000000iiVd. Anything to point me in the right direction, or alternative solution recommendations, would be much appreciated. Thanks.
Here is the snippet where I am refering End Point from NamedCredentilas. In this example "ProjectService" is my NamedCredential name.
HttpRequest req = new HttpRequest();
req.setEndpoint('callout:ProjectService');
When using Named Credentials you can give the Authentications details in the Named Credentials it self, and make sure to check
"Generate Authorization Header".
Thanks,
Harish