harsh
harsh

Reputation: 585

limiting requests and authenticating the user in rest api

I have a machine learning model which I have converted as a Rest API using Django rest framework. Now I want to distribute the API to users but how can I authenticate and limit the requests by the users by allowing them to interact the api using an api key?. And also I want to mask the URL of the API before giving to the users how can I do this in django rest framework.

Upvotes: 1

Views: 312

Answers (1)

Santiago Ivulich
Santiago Ivulich

Reputation: 352

If you have full control of the requirements I would consider using JWT tokens. A simple library to do this is Simple Jwt, follow the steps in the wiki to configure it.

To rate limit check Django Rest Framework Throttling module.

Upvotes: 1

Related Questions