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 8581153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:58:48+00:00 2026-06-11T20:58:48+00:00

I have a django web app with a RESTful API written using TastyPie. I

  • 0

I have a django web app with a RESTful API written using TastyPie. I want to allow my mobile app access to the API that uses username and api_keys, but have struggled to know what the best way to get the api_key back to the mobile client.

I am following the resource code provided here:
How can I login to django using tastypie

My question is if this is a secure method of passing a username and password as data parameters in a POST request. Should I be okay?

Here is an example of the post request:

POST to http://myapp.com/api/user/login with data { ‘username’ : ‘me’,
‘password’ : ‘l33t’ }.

  • 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-06-11T20:58:49+00:00Added an answer on June 11, 2026 at 8:58 pm

    While data sent over a POST request can be sniffed, that doesn’t necessarily mean that you shouldn’t be using it to submit user credentials to your RESTful API. So, to answer your question directly:

    • POSTing a username and password for authentication is not secure. It can be sniffed.
    • That being said, submitting user credentials in this fashion is something that in my experience is done quite often. A good practice is returning a remember token (or in your case API key) to the user once they have been authenticated. Aside from persisting sessions, the advantage is that if some malicious user gets hold of an API key, it can be reset easily without needing to reset the user’s username/password (although it might be a good idea to do so anyway). Of course the downside is that remember tokens/API keys are generally stored in unsafe places like browser cookies/mistakenly in the source of some github repo.

    So, is POSTing authentication credentials sniff-proof, no. Can you do it/is it done, yes.
    Of course, you can see if HTTPS is an appropriate solution for you in this context if you require more security.

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

Sidebar

Related Questions

I'm using Django and Tastypie to create a RESTful web app. I have a
I have a Django app that uses MySQL as a backend. I'm having difficulties
I have a Django web app that I would like to use in a
I am working on a web-app using Django 1.3 and Python2.6. I have to
I have a URL in a Django based web app that looks similar to
I have an existing django web app that is in use. I have to
I'm building a Django app and I'm using Spynner for web crawling. I have
I have a reviews/ratings web application, a la Digg. My django app content has
I have a Django webapp that has both a front-end, web-accessible component and an
I had the following idea: Say we have a webapp written using django which

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.