AutoIt
AutoIt
Frame.io - Get Team ID
See more Frame.io Examples
Get your team ID.Chilkat AutoIt Downloads
Local $bSuccess = False
; This example assumes the Chilkat API to have been previously unlocked.
; See Global Unlock Sample for sample code.
$oHttp = ObjCreate("Chilkat.Http")
; Implements the following CURL command:
; curl \
; -H "Authorization: Bearer <FRAME_IO_DEV_TOKEN>" \
; https://api.frame.io/v2/accounts/<ACCOUNT_ID>/teams
; Use the following online tool to generate HTTP code from a CURL command
; Convert a cURL Command to HTTP Source Code
; Adds the "Authorization: Bearer <FRAME_IO_DEV_TOKEN>" header.
$oHttp.AuthToken = "<FRAME_IO_DEV_TOKEN>"
$oHttp.SetUrlVar("account_id","b1cd046b-a3bf-4ef8-81a6-0afd74ecc455")
$oSbResponseBody = ObjCreate("Chilkat.StringBuilder")
$bSuccess = $oHttp.QuickGetSb("https://api.frame.io/v2/accounts/{$account_id}/teams",$oSbResponseBody)
If ($bSuccess = False) Then
ConsoleWrite($oHttp.LastErrorText & @CRLF)
Exit
EndIf
$oJResp = ObjCreate("Chilkat.JsonObject")
$oJResp.LoadSb($oSbResponseBody)
$oJResp.EmitCompact = False
ConsoleWrite("Response Body:" & @CRLF)
ConsoleWrite($oJResp.Emit() & @CRLF)
Local $iRespStatusCode = $oHttp.LastStatus
ConsoleWrite("Response Status Code = " & $iRespStatusCode & @CRLF)
If ($iRespStatusCode >= 400) Then
ConsoleWrite("Response Header:" & @CRLF)
ConsoleWrite($oHttp.LastHeader & @CRLF)
ConsoleWrite("Failed." & @CRLF)
Exit
EndIf
; Sample JSON response:
; (Sample code for parsing the JSON response is shown below)
; {
; "image_64": null,
; "project_count": 1,
; "default_color": "5B53FF",
; "deleted_at": null,
; "image_256": null,
; "background_color": null,
; "session_watermark_templates": [
; ],
; "font_color": null,
; "email_branding": {
; "_type": "email_branding",
; "accent_color": null,
; "background_color": null,
; "default_accent_color": "5B53FF",
; "default_background_color": "F7F8FA",
; "id": "71cddf30-cdd6-4db9-9f1f-f119c3a6c36d",
; "image": null,
; "upload_url": "https://frameio-uploads-production.s3-accelerate.amazonaws.com/email_branding/71c...508199e26038"
; },
; "bio": null,
; "updated_at": "2020-08-18T02:20:14.432078Z",
; "link": null,
; "default_font_color": "20222B",
; "image_128": null,
; "dark_theme": false,
; "disable_sbwm_internally": false,
; "account_id": "b1cd046b-a3bf-4ef8-81a6-0afd74ecc455",
; "name": "Chilkat's Team",
; "location": null,
; "solo": false,
; "watermark": null,
; "file_count": 0,
; "duration": 0,
; "image_32": null,
; "team_image": null,
; "default_background_color": "FFFFFF",
; "resource_id": "8e32b1ae-86db-4164-83b1-81b37b2e7499",
; "color": null,
; "frames": 0,
; "storage": 0,
; "collaborator_count": 1,
; "creator_id": "34b4f98a-7cc9-4159-8f46-c7c3d837fc6f",
; "default_session_watermark_template_id": null,
; "archived_storage": 0,
; "slack_webhook": null,
; "upload_url": "https://frameio-uploads-production.s3-accelerate.amazonaws.com/teams/95a5fb..a86b2663",
; "member_count": 1,
; "_type": "team",
; "asset_lifecycle_policy": null,
; "member_limit": null,
; "id": "95a5fbad-688d-46fc-aef1-2f011dd76c10",
; "storage_limit": null,
; "access": "private",
; "inserted_at": "2020-08-18T02:20:13.171582Z",
; "folder_count": 0
; }
; Sample code for parsing the JSON response...
; Use the following online tool to generate parsing code from sample JSON:
; Generate Parsing Code from JSON
Local $sImage_64 = $oJResp.StringOf("image_64")
Local $iProject_count = $oJResp.IntOf("project_count")
Local $sDefault_color = $oJResp.StringOf("default_color")
Local $sDeleted_at = $oJResp.StringOf("deleted_at")
Local $sImage_256 = $oJResp.StringOf("image_256")
Local $sBackground_color = $oJResp.StringOf("background_color")
Local $sFont_color = $oJResp.StringOf("font_color")
Local $sEmail_branding_type = $oJResp.StringOf("email_branding._type")
Local $sEmail_brandingAccent_color = $oJResp.StringOf("email_branding.accent_color")
Local $sEmail_brandingBackground_color = $oJResp.StringOf("email_branding.background_color")
Local $sEmail_brandingDefault_accent_color = $oJResp.StringOf("email_branding.default_accent_color")
Local $sEmail_brandingDefault_background_color = $oJResp.StringOf("email_branding.default_background_color")
Local $sEmail_brandingId = $oJResp.StringOf("email_branding.id")
Local $sEmail_brandingImage = $oJResp.StringOf("email_branding.image")
Local $sEmail_brandingUpload_url = $oJResp.StringOf("email_branding.upload_url")
Local $sBio = $oJResp.StringOf("bio")
Local $sUpdated_at = $oJResp.StringOf("updated_at")
Local $sLink = $oJResp.StringOf("link")
Local $sDefault_font_color = $oJResp.StringOf("default_font_color")
Local $sImage_128 = $oJResp.StringOf("image_128")
Local $bDark_theme = $oJResp.BoolOf("dark_theme")
Local $bDisable_sbwm_internally = $oJResp.BoolOf("disable_sbwm_internally")
Local $sAccount_id = $oJResp.StringOf("account_id")
Local $sName = $oJResp.StringOf("name")
Local $sLocation = $oJResp.StringOf("location")
Local $bSolo = $oJResp.BoolOf("solo")
Local $sWatermark = $oJResp.StringOf("watermark")
Local $iFile_count = $oJResp.IntOf("file_count")
Local $iDuration = $oJResp.IntOf("duration")
Local $sImage_32 = $oJResp.StringOf("image_32")
Local $sTeam_image = $oJResp.StringOf("team_image")
Local $sDefault_background_color = $oJResp.StringOf("default_background_color")
Local $sResource_id = $oJResp.StringOf("resource_id")
Local $sColor = $oJResp.StringOf("color")
Local $iFrames = $oJResp.IntOf("frames")
Local $iStorage = $oJResp.IntOf("storage")
Local $iCollaborator_count = $oJResp.IntOf("collaborator_count")
Local $sCreator_id = $oJResp.StringOf("creator_id")
Local $sDefault_session_watermark_template_id = $oJResp.StringOf("default_session_watermark_template_id")
Local $iArchived_storage = $oJResp.IntOf("archived_storage")
Local $slack_webhook = $oJResp.StringOf("slack_webhook")
Local $sUpload_url = $oJResp.StringOf("upload_url")
Local $iMember_count = $oJResp.IntOf("member_count")
Local $sV_type = $oJResp.StringOf("_type")
Local $sAsset_lifecycle_policy = $oJResp.StringOf("asset_lifecycle_policy")
Local $sMember_limit = $oJResp.StringOf("member_limit")
Local $sId = $oJResp.StringOf("id")
Local $storage_limit = $oJResp.StringOf("storage_limit")
Local $sAccess = $oJResp.StringOf("access")
Local $sInserted_at = $oJResp.StringOf("inserted_at")
Local $iFolder_count = $oJResp.IntOf("folder_count")