This error is caused because Django is not able to complete the authentication process required by the API.
For me, the error was in token.json file. Clearing it and write a script to call the API again corrected the flow procedure and hence the server resumed.