I am building a personal Python-based bot to monitor my own account balance. I am trying to implement the OAuth 2.0 flow using a Confidential Client to handle token refreshing automatically.
I am hitting a blocker where I cannot exchange my authorisation code for an access token.
I am successfully obtaining an authorization code. However, when my application sends the POST request to exchange this code for a token, it fails immediately.
-
Endpoint:
https://api.monzo.com/oauth2/token -
Request Type:
POST -
Parameters:
grant_type=authorization_code,client_id=...,code=...
The Response:
JSON
{
"code": "bad_request.client_not_enabled",
"error": "invalid_request",
"error_description": "Client not enabled",
"message": "Client not enabled"
}
Steps Tried:
-
Created a new Confidential Client in the Developer Portal.
-
I successfully receive the “Login/Approval Request” notification for the OAUTH app in my Monzo mobile app and approve it.
-
I have tried deleting and recreating the client multiple times (clearing cookies/sessions in between).
Anything else I can do?