curl -X POST -d "password=<your_password>&username=<your_username>&email=<your_email>" https://messaging-django.herokuapp.com/api/users/registration
{ "email": "your_email", "username": "your_username", "token": "your_token" }
curl -X POST -d "password=<your_password>&username=<your_email>" https://messaging-django.herokuapp.com/api/users/registration
- Notice that in username you should pass your Email!
{ "token" : "your_token" }
- "Authorization" : "Token <your_token>"
curl -X POST -d "sender=<your_username>&receiver=<user_you_would_like_to_send_to>&message=<your_message>&subject=<your_subject>&unread=True" https://messaging-django.herokuapp.com/api/messages/
{ "detail" : "created successfully" }
curl -X POST https://messaging-django.herokuapp.com/api/messages/<message_id>/
curl -X POST -d https://messaging-django.herokuapp.com/api/messages/<message_id>/
curl GET https://messaging-django.herokuapp.com/api/users/<your_username>/received_messages/
curl GET https://messaging-django.herokuapp.com/api/users/<your_username>/sent_messages/
curl GET https://messaging-django.herokuapp.com/api/users/<your_username>/received_unread_messages/
- git clone https://github.com/BenK93/MessagingAPI.git
- pipenv install -r requirements.txt
- pipenv shell
- python manage.py makemigrations
- python manage.py migrate
- python manage.py createsuperuser
- python manage.py runserver
- will be available on
http://localhost:8000