0

I am using Slack API token in Google App script and calling in the hard coded API token which needs to be hidden in the script. Any idea on how I can hide it or store and then call it?

Example:-

var response = UrlFetchApp.fetch(GET_USER_ID_FROM_EMAILID_ENDPOINT, { method : 'get', contentType : 'application/x-www-form-urlencoded', headers : { Authorization : 'Bearer ' + 'xoxb-181.....' // Token to be hidden or stored }, payload : JSON.stringify(payload), muteHttpExceptions : true, })

  • Have you looked at properties service? – Cooper Aug 03 '22 at 14:41
  • 1
    Does this answer your question? [Storing API keys and secrets in Google AppScript user property](https://stackoverflow.com/questions/61540618/storing-api-keys-and-secrets-in-google-appscript-user-property) – Emel Aug 04 '22 at 07:11

0 Answers0