Skip to content

Latest commit

 

History

History

authentication

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Authentication

Code snippets used to retrieve secrets and use base64-encoding authentication, which is necessary for using Twilio APIs without an SDK.

script for storing secrets in a table so they aren't easily exposed.

  • This is optional; the secrets can be entered directly into the scrips

Example Secrets Table: Secrets Table

  • The value field is typically hidden
  • See hidden field for the formula used to hide fields.
  • Other secrets, such as Messaging Service SID and API URL, can be added as new field.

There are two ways to authenticate, depending on where and how a script is run

  1. Browser Based
    • btoa() global function
    • This works when running an Airtable script in your browser (i.e. pushing a button or hitting "Run").
  2. Server Automation
    • Minified version of base64-encoding function
    • This is needed when running a script as an automation in airtable (when it runs on their server, not your browser)

Option 2: Server Automation would work in all cases, but requires some extra code, so I only use it when necessary.