Reputation: 39
I'm trying to create a RESTful API using django-rest-framework and I'm unable to secure it with access key, How can I go about it?
Upvotes: 2
Views: 591
Reputation: 1520
Depending on your needs, you can use built-in Django Rest Framework token authentication, as stated here, this will create non-expiring tokens in database that can be used as API keys in your case. However, if you don't want to store them at database and set your custom expiration periods for your tokens, I suggest you using simplejwt library for Django Rest Framework
Upvotes: 0