CDP4S uses a Named Credential to connect to Sitecore CDP & Personalize.
Find Named Credentials in setup, and click New Named Credential. Use the following settings:
URL: the Sitecore CDP API endpoint for your region.
Identity Type: Named Principal
Authentication Protocol: Password Authentication
Username: (Sitecore CDP API key)
Password: (Sitecore CDP API secret)
Check Generate Authorization Header and Allow Merge Fields in HTTP Body. The latter is required to allow CDP4S to include the API key in some requests; this uses token replacement and does not expose the API key.
...