Help

Using remoteFetchAsync in a button's script

274 0
cancel
Showing results for 
Search instead for 
Did you mean: 
craibuc
6 - Interface Innovator
6 - Interface Innovator

I've created a script that is attached to a view's button.

In this script, I'm calling an API with remoteFetchAsync().  I need to supply basic authentication credentials, but btoa() and Buffer don't work in my script:

 

const authorization = btoa(`${ credentials.username }:${ credentials.password }`)
const authorization = Buffer.from(`${ credentials.username }:${ credentials.password }`).toString('base64')
output.text(`authorization: ${authorization}`)

Is there another option?

Is TypeScript supported in a script that is triggered by a button?  If so, how do I enable it?

FYI, the "Ask the community" link (https://community.airtable.com/c/developers/scripting) returns 404.

0 Replies 0