# List Meetings generates Scope error (4700) via service code but works via postman and cURL

**URL:** <https://devforum.zoom.us/t/list-meetings-generates-scope-error-4700-via-service-code-but-works-via-postman-and-curl/70260>\
**Category:** Meetings\
**Created:** [June 9, 2022, 5:19pm UTC](https://devforum.zoom.us/t/list-meetings-generates-scope-error-4700-via-service-code-but-works-via-postman-and-curl/70260 "2022-06-09T17:19:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gibron](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gibron/32/37298_2.png) [@gibron](https://devforum.zoom.us/u/gibron)\
**Post date:** [June 9, 2022, 5:19pm UTC](https://devforum.zoom.us/t/list-meetings-generates-scope-error-4700-via-service-code-but-works-via-postman-and-curl/70260/1 "2022-06-09T17:19:12Z")

</div>

**Description**  
Attempting to list the meetings for current user but receiving a scope error via service (python/flask) code. Same access\_token works via postman without issue.

**Error**

```auto
{'code': 4700, 'message': 'Invalid access token, does not contain scopes: [meeting:write, meeting:write:admin].'}

```

**Which App Type (OAuth / Chatbot / JWT / Webhook)?**  
SDK - “Zoom App”

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/8/88b2418ac1dbd242dc28dc58257d0b1503c8ae3a.png)

**Which Endpoint/s?**  
`https://api.zoom.us/v2/users/me/meetings`

**How To Reproduce (If applicable)**

1. User Authorizes via `https://zoom.us/oauth/authorize?response_type=code&client_id=[client_id]&redirect_uri=[redirect_uri]`
2. Capture `[code]` value appended to `[redirect_uri]`. Then send authorization code grant token request `https://zoom.us/oauth/token?grant_type=authorization_code&code=[code]&redirect_uri=[redirect_uri]` using basic auth header `base64.encoded(client_id:client_secret)` to get the initial refresh token
3. use the refresh token to get access token `https://zoom.us/oauth/token?grant_type=refresh_token&refresh_token=[refresh_token]` (same basic auth as above)
4. now that we have an active access token, use it to request `https://api.zoom.us/v2/users/me/meetings` using bearer access token generated above
5. via service code receive this error `{'code': 4700, 'message': 'Invalid access token, does not contain scopes: [meeting:write, meeting:write:admin].'}`

NOTE: This exact flow works via postman… 🤔

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/8/d/8d395fc8df0fc87b6ad2072bdbc09125461fa265.jpeg)

_Calling Code (Python)_

```auto
   ... 
    url = f"https://api.zoom.us/v2/users/me/meetings"
    headers = {
        'Authorization': f"Bearer {access_token}",
    }
    response = requests.post(url, headers=headers)
    ...

```

**Additional Context**  
The token should have `meeting:read` scope which, as I understand from the [API documentation](https://marketplace.zoom.us/docs/api-reference/zoom-api/methods/#operation/meetings), is sufficient.

The response from the refresh step to get the active access\_token is below:

```auto
{'access_token': '[access_token]', 'token_type': 'bearer', 'refresh_token': '[refresh_token]', 'expires_in': 3599, 'scope': 'meeting:read recording:read user:read zoomapp:inmeeting'}

```

(all actual token values replaced by bracketed symbols)

Also to test excluding any additional headers that postman might add I tried it as cURL and it works:

 ![image](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/f/2/f2ad3dfa71520b5aa60d5055f77defc60596667e.png)

---

<div class="post-metadata">

**Author:** ![MultiplayerSession](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/multiplayersession/32/66446_2.png) [@MultiplayerSession](https://devforum.zoom.us/u/MultiplayerSession)\
**Post date:** [June 9, 2022, 8:54pm UTC](https://devforum.zoom.us/t/list-meetings-generates-scope-error-4700-via-service-code-but-works-via-postman-and-curl/70260/2 "2022-06-09T20:54:57Z")

</div>

> [@gibron](#):
>
> `response = requests.post(url, headers=headers)`

Try switching to `requests.get()` so that you send a `GET` request and not a `POST` request. This will match the calls you made in Postman.

---

<div class="post-metadata">

**Author:** ![gibron](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/gibron/32/37298_2.png) [@gibron](https://devforum.zoom.us/u/gibron)\
**Post date:** [June 9, 2022, 9:36pm UTC](https://devforum.zoom.us/t/list-meetings-generates-scope-error-4700-via-service-code-but-works-via-postman-and-curl/70260/3 "2022-06-09T21:36:01Z")

</div>

🤦‍♂️ Alas… that was exactly it. Thank you @MultiplayerSession 🙏
