Twitter api form submission, get following into table grid

I am trying to run a GET request to twitters api, in order to find the users a particular user by ID follows.

For example I can run this request with Authorization Bearer token in the header and populate a table grid with the returned data just fine https://api.twitter.com/2/users/4633808432/followers

What I really want to do is have a Text Input and submit button that populates this table grid each time I submit a different user ID.

I first don’t know how to pass the userid into the GET request after the text input is populated and the submit button is submitted. I Know that the key value is id but when I tried to add that as a query in the connector I got a response saying there was multiple id's even when I did it like this https://api.twitter.com/2/users/:id/followers Thinking the query value would replace the :id

This is the exact error

{
  "errors": [
    {
      "parameters": {
        "id": [
          ":id",
          "1563238405257179138"
        ]
      },
      "message": "The `id` query parameter value [:id] is not valid"
    },
    {
      "parameters": {
        "id": [
          ":id",
          "1563238405257179138"
        ]
      },
      "message": "Duplicate parameters are not allowed: the `id` query parameter"
    }
  ],
  "title": "Invalid Request",
  "detail": "One or more parameters to your request was invalid.",
  "type": "https://api.twitter.com/2/problems/invalid-request"
}

Now let’s say I got the text input to submit to the GET request with the proper id parameter and it returned the correct data, how would I then direct that data into the tablegrid component on the fly.

Any help would be greatly appreciated.

If I can get a basic understanding of this, I really see this tool being quite powerful for prototyping what I am trying to do.

Thanks in advance.

Hi @anders,

Looks like the colon used before id in this API endpoint (https://api.twitter.com/2/users/:id/followers) is mainly used to make it dynamic.

On studio, you can use single curly brackets instead of this colon so ideally, the endpoint should be something like this:
https://api.twitter.com/2/users/{id}/followers

:information_source: We use single curly brackets to use dynamic path params/query string in a Rest API and doubly curly brackets for dynamic variables in databases.

I hope this will help. :slight_smile: