Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7614383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:23:27+00:00 2026-05-31T02:23:27+00:00

I have noticed that some API have you pass an API key as a

  • 0

I have noticed that some API have you pass an API key as a url parameter while others have you pass it in the HTTP HEADER. I am developing a web-based application that is going to rely heavily on a REST API and right now I am just having it so the API KEY is pass through as a url parameter.

My question is whether or not one of those options is more secure than the other?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T02:23:28+00:00Added an answer on May 31, 2026 at 2:23 am

    In both cases, the API key will be passed unencrypted. So both are insecure unless you use HTTPS.

    In practice, HTTP header turns out to be a little bit more secure because –

    1. The url gets stored in browser history
    2. The url gets stored in access logs on the server side

    Aside : A REST API over the web cannot be secured unless you ask the user to login with his credentials. Anybody can easily identify the API key and make requests to your server.

    EDIT :
    In response to @segfault’s comments –

    A website user generally does not enter an API key. They enter their user name and password, and this is traded to get the API key or access token as it is typically called.

    If you force your users to enter the API key instead of user name and password, well, it’d be secure. But as I said, I haven’t seen any serious application do that.

    More specifically, I meant “If a backend API expects an API key, and you are making AJAX calls from the browser, and you don’t ask the user for some sort of credentials, you are insecure”

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have noticed that some apps like Safari and Mail show a loading indicator
I noticed that some enumerations have None as a enumeration member. For example what
I noticed that some stylesheets have something like this: body { font-size: 62.5%/1.2em; }
I'm trying to fetch some HTML from various blogs and have noticed that different
I'm sure some of you noticed that if you have Acrobat Reader ( or
I am a Google Maps API (JavaScript) developer. I have noticed that Google uses
I have setup a sidebar via the jQuery API. Now I noticed that when
I've noticed that launching some of the activities in the Android Emulator while running
Welcome, I notice that Youtube make some changes into their website code. Anyone have
I created some widgets with jQuery UI and I notice that buttons have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.