diff --git a/ReadMe.md b/ReadMe.md index 59bffc1..154ae17 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -14,6 +14,29 @@ POST "password": "" } ``` +**How it works?** + +### To optain the jwt Token for the first time from other services +```python +import requests +url = 'http:///token/' + +credentials = { + "username": "your_username", + "password": "your_password" +} + +response = requests.post(url, data=credentials) +token = response.json().get('access') +``` +Store this token to use in future requests like this: +```python +headers = { + 'Authorization': f'Bearer {token}', +} +response = requests.post('http:///<...>/', headers=headers, json=data_to_send) +``` + ## Well related end-points ### 1. create **URL:**