Built a API with django rest framework how do i get a key for people or is it open to them

80 views
Skip to first unread message

djangorobert

unread,
Apr 11, 2016, 10:52:25 PM4/11/16
to Django users
Hello fellow django users I recently built a api for just a small sprint board where tasks can be set its built with django and django rest framework what i see though  is most apis have like a key that others can use do i have to offer api keys or is mine able just able to be free thats where im confused. 

Mainly for others to use an api do i have to offer a key 
or is it ok to just let them go to the site and use it thanks 
please be patientim new with apis 


thanks Robert

Amandeep Singh

unread,
Apr 12, 2016, 1:25:51 AM4/12/16
to django...@googlegroups.com
Hi Robert

As for as API key is concerned it's mainly to track usage records for a key which would be linked to a person/user entity and provide a layer to block unwanted requests(stops requests at middleware before hitting the view). This key could be sent in headers or as the query parameter.

But the choice of using a key is totally yours, if you are providing a universal key then it's no good and if you  are providing key per user then you could even think about using auth tokens for authorization and authentication( benefit easy to integrate with rest-framework).

Amandeep

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0c239c3d-bf92-4e7f-a101-0b1b562d7a40%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages