How to use fetch on client script?
How to use fetch on client script?
Not sure the correct syntax to use fetch within the client script when adding a token value. And then also saving that value to a variable to be used. Would someone be able to give me an example?
What I thought it may look like is:
fetch(
'
https://zohoapis.com/crm/v5/Accounts?fields=Account_Name,Phone,Industry&per_page=1'
)
{
headers: { Authentication: 'Bearer {'access token' }
})
.then(response => response.json())
.then(data => log(data))
ZDK
.
Page
.getForm().setValues({
EstimatedCost
: api_key?
})