# Error occured while processing the request

**URL:** <https://community.monzo.com/t/error-occured-while-processing-the-request/115210>\
**Category:** Developers\
**Created:** [18 March 2021 14:51 UTC](https://community.monzo.com/t/error-occured-while-processing-the-request/115210 "2021-03-18T14:51:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajcapium](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@rajcapium](https://community.monzo.com/u/rajcapium)\
**Post date:** [18 March 2021 14:51 UTC](https://community.monzo.com/t/error-occured-while-processing-the-request/115210/1 "2021-03-18T14:51:06Z")

</div>

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](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”: {}  
}

 ![Monzo screen shot](https://global.discourse-cdn.com/monzo/original/3X/d/c/dc51bb452b97964df9794b137cb36243e4072ae9.png)

---

<div class="post-metadata">

**Author:** ![rajcapium](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@rajcapium](https://community.monzo.com/u/rajcapium)\
**Post date:** [19 March 2021 07:32 UTC](https://community.monzo.com/t/error-occured-while-processing-the-request/115210/2 "2021-03-19T07:32:39Z")

</div>

Any updates?

---

<div class="post-metadata">

**Author:** ![Ordog](https://dub1.discourse-cdn.com/monzo/user_avatar/community.monzo.com/ordog/32/22446_2.png) [@Ordog](https://community.monzo.com/u/Ordog)\
**Post date:** [19 March 2021 08:13 UTC](https://community.monzo.com/t/error-occured-while-processing-the-request/115210/3 "2021-03-19T08:13:10Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![rajcapium](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@rajcapium](https://community.monzo.com/u/rajcapium)\
**Post date:** [19 March 2021 08:36 UTC](https://community.monzo.com/t/error-occured-while-processing-the-request/115210/4 "2021-03-19T08:36:44Z")

</div>

> [@Ordog](#):
>
> never

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

---

<div class="post-metadata">

**Author:** ![Ordog](https://dub1.discourse-cdn.com/monzo/user_avatar/community.monzo.com/ordog/32/22446_2.png) [@Ordog](https://community.monzo.com/u/Ordog)\
**Post date:** [19 March 2021 08:39 UTC](https://community.monzo.com/t/error-occured-while-processing-the-request/115210/5 "2021-03-19T08:39:35Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![zombi](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@zombi](https://community.monzo.com/u/zombi)\
**Post date:** [19 March 2021 13:51 UTC](https://community.monzo.com/t/error-occured-while-processing-the-request/115210/6 "2021-03-19T13:51:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![rajcapium](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@rajcapium](https://community.monzo.com/u/rajcapium)\
**Post date:** [19 March 2021 14:05 UTC](https://community.monzo.com/t/error-occured-while-processing-the-request/115210/7 "2021-03-19T14:05:45Z")

</div>

Hi Team,  
First I try this one

```auto
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.
```

---

<div class="post-metadata">

**Author:** ![zombi](https://avatars.discourse-cdn.com/v4/letter/z/6f9a4e/32.png) [@zombi](https://community.monzo.com/u/zombi)\
**Post date:** [19 March 2021 14:41 UTC](https://community.monzo.com/t/error-occured-while-processing-the-request/115210/8 "2021-03-19T14:41:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![rajcapium](https://avatars.discourse-cdn.com/v4/letter/r/f9ae1b/32.png) [@rajcapium](https://community.monzo.com/u/rajcapium)\
**Post date:** [22 March 2021 05:39 UTC](https://community.monzo.com/t/error-occured-while-processing-the-request/115210/9 "2021-03-22T05:39:45Z")

</div>

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

```auto
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"

```

````auto
{
    "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)
````
