# V2 to V4 migration

**URL:** <https://forum.frame.io/t/v2-to-v4-migration/3253>\
**Category:** Help\
**Tags:** python, api, v4, v4-migration\
**Created:** [March 25, 2026, 11:11pm UTC](https://forum.frame.io/t/v2-to-v4-migration/3253 "2026-03-25T23:11:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathan-vandevoort](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@nathan-vandevoort](https://forum.frame.io/u/nathan-vandevoort)\
**Post date:** [March 25, 2026, 11:11pm UTC](https://forum.frame.io/t/v2-to-v4-migration/3253/1 "2026-03-25T23:11:55Z")

</div>

Hello,

We’ve been using the [Frame.io](http://Frame.io) v2 api (via the python SDK) for some time now. Today our users have been unable to get our tools to work. client.teams.list\_all() was returning an empty list.

I did some digging and saw there was a new V4 api so I wanted to give that a shot (via the new python SDK). Following the migration guide I added ` **x-frameio-legacy-token-auth** ` to the headers so we can continue to use our legacy tokens and now when I run: client.workspaces.index(\<user\_id\>) I get a 401 unauthorized error code. I’m able to get\_me().

We have to use the legacy tokens since we currently do not license [frame.io](http://frame.io) through adobe but still through our original plan.

Is there some authorization limitations with the legacy tokens? Is there some other issue I’m not aware of?

```auto
import frameio

token = "<token>"

headers = {'x-frameio-legacy-token-auth': 'true'}
client = frameio.Frameio(token=token, headers=headers)

client_data = client.users.show()
account_id = client.users.show().data.id

client.workspaces.index(account_id=account_id) # Raises 401 error.

```

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![CharlieAnderson](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.frame.io/charlieanderson/32/491_2.png) [@CharlieAnderson](https://forum.frame.io/u/CharlieAnderson)\
**Post date:** [March 26, 2026, 3:27pm UTC](https://forum.frame.io/t/v2-to-v4-migration/3253/2 "2026-03-26T15:27:11Z")

</div>

hi @nathan-vandevoort you are using the user id obtained from `/me` which is not the account\_id. You need to use `client.accounts.index()` to list the accounts and the ID that’s returned (or if multiple, need to add a way for user to select which one) is what you’d use

---

<div class="post-metadata">

**Author:** ![rosiec](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.frame.io/rosiec/32/518_2.png) [@rosiec](https://forum.frame.io/u/rosiec)\
**Post date:** [March 26, 2026, 5:11pm UTC](https://forum.frame.io/t/v2-to-v4-migration/3253/3 "2026-03-26T17:11:41Z")

</div>

Hi @nathan-vandevoort!

Following up with a quick example of the changes Charlie mentioned just in case it helps get things unblocked faster. (One thing to note is that this assumes you only have one account ID to work with. If you have multiple, you’ll want to adjust the index):

```auto
  import frameio                                                                                                                                                 
   
  token = "<token>"                                                                                                                                              
                  
  client = frameio.Frameio(
      token=token,
      headers={"x-frameio-legacy-token-auth": "true"},
  )                                                                                                                                                              
   
  account_id = client.accounts.index().items[0].id                                                                                                               
                  
  client.workspaces.index(account_id=account_id)  

```

---

<div class="post-metadata">

**Author:** ![nathan-vandevoort](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@nathan-vandevoort](https://forum.frame.io/u/nathan-vandevoort)\
**Post date:** [March 30, 2026, 7:34pm UTC](https://forum.frame.io/t/v2-to-v4-migration/3253/4 "2026-03-30T19:34:07Z")

</div>

This was exactly the problem. Once I had that piece adopting the new API was very seamless. Thank you for the help!
