Fetch function for authentication api

Hi! I need to send http request to authentication api with fetch function in react. Where should I put the apikey? Headers, body or parameters? Is there an example?

You should NOT be including an API key in any Fetch requests. That would expose your API key to anyone sniffing network traffic!

If you’re talking about /authn, this endpoint does NOT require the use of an API key.

Since you’re using React, you may want to check out our AuthJs library that is a wrapper around our /authn API to help you structure your calls.