This took me two whole days to resolve. I did everything I could to fix this, but the 401 still showed up every time. Mine was a Flutter app, and I was using the Dio package for API calls. I switched from Dio to HTTP, and this resolved this issue for me. Somehow Dio was not able to send the request properly