I’m building a Web API that will require a developer or API key for access. Is it better to require the API key be in the querystring or in the request headers?
ASP.NET Web API 4
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In general I think a request header is optimal, but if you’re planning to have your API called from a browser you should use a request parameter: it is often harder to do request headers from browser code than from server side code.