If the API is using basic authentication, you must combine the api key and secret in this format:
api_key:api_secret
and then base64 encode it. You would then pass in the encoded string as your authentication. This site does a pretty good job at making it simple for you to get it in the right format.
If your API auth uses OAuth2.0, the steps are a bit more involved, we can go into that if you think it’s necessary.
I just came across a problem with this solution. The only works when running the whole collection in the collection runner. When running a single request the collection pre-request scripts don’t run.
With auth, this does work since there is inheritance.
Sorry, my mistake. It does work by setting the headers in the collection - even when running a single request BUT for me it only works using the following format: