Zendesk Talk Google Apps Script Authentication
I am attempting to create a google apps script that will change the available agent on Zendesk Talk based on our Google Calendar.
However I am unable to pass the authentication properly from the script:
var url = 'https://{domain}.zendesk.com/api/v2/channels/voice/availabilities/' + {id} + '.json';
var data = {
'available': 'false',
'via': 'phone',
'status': 'not_available'
};
var options = {
"method": "put",
"headers": {"Content-Type": "application/json", "Authorization": "{username}:{password}"},
"payload": JSON.stringify(data)
};
var response = UrlFetchApp.fetch(url, options);
Guidance is appreciated
-
There is no way to pass the auth in the proper format.
Please sign in to leave a comment.
1 Comments