Error occured while processing the request

Hi Team,
While Fetching the data from accounts we are getting the below errors. Please find the below details. Here I am passing the new token. So can you please suggest this?
URL https://api.monzo.com/accounts
Header: Authorization :Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXVCJ9.eyJlYiI6IkZuaWlUWlhneVFCNkkydm9RVmRRIiwianRpIjoiYWNjdG9rXzAwMDBBNUt4dGhHelZ5aTkzeFBvNXgiLCJ0eXAiOiJhdCIsInYiOiI2In0.I_URO6GrU6ZhmDTM8aXpHuQvGGG8ayZX6UvuDVyM2NqPZnALirBu0drHq66OHjE-1hdl5Dt7_1v9d0dRONfuZw

Responce :
{
ā€œcodeā€: ā€œforbidden.insufficient_permissionsā€,
ā€œmessageā€: ā€œAccess forbidden due to insufficient permissionsā€,
ā€œparamsā€: {
ā€œclient_idā€: ā€œoauth2client_0000A5KKdfqDAsLe1ekd85ā€,
ā€œuser_idā€: ā€œuser_0000A5IY97eWjRT2uXmM4Zā€
},
ā€œretryableā€: {}
}

Any updates?

Monzo staff rarely comment on here never mind Monzo developers.

If they see it they will help, but I wouldn’t hold your breath for it being anytime soon.

Is there any direct email to send their support email address?

They have help@monzo.com but my understanding is that it’s for customer account queries, not technical support in regards to their API.

1 Like

Have you used the oauth flow to get your access token or taken the one from the playground(after using the oauth flow) ? Have you approved the access in the app?

Hi Team,
First I try this one

http --form POST "https://api.monzo.com/oauth2/token" \
    "grant_type=authorization_code" \
    "client_id=$client_id" \
    "client_secret=$client_secret" \
    "redirect_uri=$redirect_uri" \
    "code=$authorization_code"
{
    "access_token": "access_token",
    "client_id": "client_id",
    "expires_in": 21600,
    "refresh_token": "refresh_token",
    "token_type": "Bearer",
    "user_id": "user_id"
} so from thi url i get the responce like token and everything.
and i after i try this 
http --form POST "https://api.monzo.com/oauth2/token" \
    "grant_type=refresh_token" \
    "client_id=$client_id" \
    "client_secret=$client_secret" \
    "refresh_token=$refresh_token"
{
    "access_token": "access_token_2",
    "client_id": "client_id",
    "expires_in": 21600,
    "refresh_token": "refresh_token_2",
    "token_type": "Bearer",
    "user_id": "user_id"
} from this url i got every thing.
but when i try to fetch the accounts data from the below url
"https://api.monzo.com/accounts" \
    "Authorization: Bearer $access_token"
here i am passed the token where i can get the from this url : "https://api.monzo.com/oauth2/token" 
but i am facing issue :{
    "error_description": "grant_type is required",
    "error": "invalid_request"
}.
so this is the flow I followed.  so can you please suggest where I did wrong. please share your info like text and screenshot format.

Which access token are you using? The one from the first response or the second?

That said the 2 nd call you are making is to refresh the token. No need to do that immediately, only do that when the access token has expired from the first call

Hi Team,
Thanks for the responce. I am giving the token from the first response, still it showing the same issue.

http --form POST "https://api.monzo.com/oauth2/token" \
    "grant_type=authorization_code" \
    "client_id=$client_id" \
    "client_secret=$client_secret" \
    "redirect_uri=$redirect_uri" \
    "code=$authorization_code"
{
    "access_token": "access_token",
    "client_id": "client_id",
    "expires_in": 21600,
    "refresh_token": "refresh_token",
    "token_type": "Bearer",
    "user_id": "user_id"
}
``` I am attaching the screenshot. so please check and please suggest this.
![Monzo screen shot1|690x419](upload://gge0Yp8akwHyWe7KPufPQhGUw74.png)