Chilkat Online Tools

VBScript / Twitter API v2 / Spaces lookup by list of IDs

Back to Collection Items

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)

' This example assumes the Chilkat API to have been previously unlocked.
' See Global Unlock Sample for sample code.

set http = CreateObject("Chilkat_9_5_0.Http")

set queryParams = CreateObject("Chilkat_9_5_0.JsonObject")
success = queryParams.UpdateString("ids","")
success = queryParams.UpdateString("space.fields","")
success = queryParams.UpdateString("expansions","")
success = queryParams.UpdateString("user.fields","")
success = queryParams.UpdateString("topic.fields","")

' Adds the "Authorization: Bearer <access_token>" header.
http.AuthToken = "<access_token>"

' resp is a Chilkat_9_5_0.HttpResponse
Set resp = http.QuickRequestParams("GET","",queryParams)
If (http.LastMethodSuccess = 0) Then
End If



Curl Command

curl -G -d "ids="
	-d "space.fields="
	-d "expansions="
	-d "user.fields="
	-d "topic.fields="
	-H "Authorization: Bearer <access_token>"

Postman Collection Item JSON

  "name": "Spaces lookup by list of IDs",
  "request": {
    "auth": {
      "type": "bearer",
      "bearer": [
          "key": "token",
          "value": "",
          "type": "string"
    "method": "GET",
    "header": [
    "url": {
      "raw": "",
      "protocol": "https",
      "host": [
      "path": [
      "query": [
          "key": "ids",
          "value": "",
          "description": "Required. A comma separated list of IDs of the Spaces to lookup. You can specify up to 100 IDs."
          "key": "space.fields",
          "value": "",
          "description": "Comma-separated list of fields from the Space object you want to return from your request.\n\nAvailable fields:\nhost_ids,created_at,creator_id,id,lang,invited_user_ids, participant_count,speaker_ids,started_at,state,title,updated_at, scheduled_start,is_ticketed,ended_at,topic_ids\n\nDefault fields:\nid,state"
          "key": "expansions",
          "value": "",
          "description": "Comma-separated list of fields to expand. Expansions enable requests to expand an ID into a full object in the includes response object.\n\nAvailable values:\ninvited_user_ids,speaker_ids,creator_id,host_ids"
          "key": "user.fields",
          "value": "",
          "description": "Comma-separated list of fields from the Space object you want to return from your request.\n\nAllowed values:\ncreated_at,description,entities,id,location,name,pinned_tweet_id,profile_image_url,protected,public_metrics,url,username,verified,withheld\n\nDefault values:\nid,name,username"
          "key": "topic.fields",
          "value": null,
          "description": "Comma-separated list of fields from the Space Topics object you want to return from your request.\n\nAvailable values:\nid,name,description"
    "description": "This endpoint returns information about one or more Spaces with the specified comma-separated list of IDs. You can request up to 100 Spaces in a single request\n\n[Sign up]( for the Twitter API"
  "response": [