Forum Academy Marketplace Showcase Pricing Features

Frame.io API Connector Status Code 400 and 401

Hello,

I need help understanding how to use the API connector. I’m looking to integrate frame.io into a Bubble project. Here is the link to their documentation;

Developer Docs: https://developer.frame.io/docs/
API Reference: Frame.io API Reference · Frame.io API Docs

I’ve successfully added my Bearer Token to the Authentication value and set the second Header to be “Content-Type = application/json”.

I’ve been importing the API calls via cURL by copy pasting the cURL straight from the API documentation and into the API connector.

Some of the calls, particularly ones that do not require a key and that are dealing with getting accounts, initialize perfectly. Other times, I simply have to plug the frame.io Account ID into the value in order for it to work.

Where I’m having trouble are the calls where it requires a key for something that I do not have, like for creating an asset, or create a project, or creating a comment, etc.

In the example shown in the screenshot, I want to do something like CREATE AN ASSET and yet, the call requires me to already have an Asset ID so I’m confused as to how I’m supposed to provide a key to something that I did not create yet.

When I try to initialize the call, I get a Status Code 400 error for a “bad request” or a Status Code 401 for “Bad Request” . I cannot figure out how to move on past this. Can someone offer some guidance?

Thank you

@randreas ,
You should first get the team id and fetch the list of projects,

  1. Get teams by - https://api.frame.io/v2/teams
  2. Get list of project for the team by - https://api.frame.io/v2/teams/{{team_id}}/projects
    it will list the project associated with team.
    response look like below,
    [
    {
    “_type”: “project”,
    “root_asset_id”: “HERE YOU HAVE ROOT ASSET ID”
    }
    ]
    use this root_asset_id to the upload asset.
    https://api.frame.io/v2/assets/{{root_asset_id }}/children

Surely, i works. tested from my test app. its working.

1 Like

Thank you for responding.

Can you post a screenshot of how you put this call together on your end? A visual example will give me a better understanding of what you are describing.

Thank you

You should call individually to get the teams & projects for the team by separate api. finally you will get asset_id.
then you can create asset for the root_asset_id.

1 Like

Thanks, but if you could please post screenshots of how you set up this particular call.

I am more of a visual learner. It will help me a great deal. There are several calls like this that if I can see how its formatted it would give me a greater idea of how to approach the rest.

It would be greatly appreciated. Once again thanks for replying.

Thank you

Good morning,

Thank you once again for looking into this. Unfortunately I learn better with visuals, so if you could please post screenshots of the calls you set up, that will help me tremendously.

Thank you

yeah sure, let me provide once ready.

Please check the video below,

//s3.amazonaws.com/appforest_uf/f1626966261118x428494897194922500/Recording%20%2339.mp4

1 Like

Thank you so very much.

I will try this out and let you know how it works for me. I’ll reach out if I have questions if that is okay.

Thank you

Hello,

I have a few questions.

I noticed that for the API itself, your Authentication is set to “Private Key In Header”. Mine is set to “None or Self Handled”. Does this matter?

Also, does the method you used work for dynamic values? I ask because throughout my app, I’d naturally want to be able to create new teams, or new projects, or new assets without having to do this particular method over and over. So I was wondering if this method could be integrated to be more streamlined or dynamic in your opinion?

Hi @randreas ,
You should create token. use this token for making you calls.
This token must set to the Authorization of Bearer token. so you can make it statically / dynamically to authendicate you api request.

Same thing, you can able to pass values to the bubble api connector with dynamic values.

Please refer: Passing Dynamic Values to the API Connecor

1 Like

Thank you very much for all of your assistance with this.

I truly appreciate it. I’ll refer to the document you sent me.

I hope all is well.