Hi there, have tried to find an answer to this but not sure. I am a bit of a noob when it comes to auth.
The API I am using has a Create Account component that returns a key I have my own API key for this which is fixed and is no problem. I assign the returned key to the user I am signing up.
My issue is that the user needs to authenticate another API using their key that was assigned. I cannot for the life of me work out how to make the key variable for the API if this is even possible.
I know dynamic values can be created in the JSON body object, can they also be created in the header?
Thanks in advance for any advice or links.
If you untick private next to the Auth key in the Header, it will be available in your calls to do with as you see fit.
I usually do this the other way round…and forget to make it private and have keys all over the place.
Which is actually quite a good idea anyway if you have test/live keys.
Hello, I don’t know how the call itself is made, you can provide us with the documentation, but anyway I believe that it would be better for each call you authenticate and not create an authentication in the API, when you create a new API you put it like “None or self-handled” so each call you need to authenticate manually, and then you just set the fields as non-private.
Thanks for the quick responses.
I was struggling to find the mentioned private selection and realised I had to create a separate API with no authentication for the functions.
With that subsequent API I could then assign the API key as a header and then de select the private function which then allowed me to map the key from the user.