By that you mean a actual Battle.net username and password, or the client credentials key and secret ?
If you are ok with the later option you can use the GScript sample here to fetch a fresh access_token, you can even run it on a time trigger inside the spreadsheet.
If you combine Erorus reply with this you can even have a separate private Google spreadsheet just for refreshing the token on a timer so your client credentials can be kept safe.
Also note the reason for a 404/403 might be something else, sometimes when they update something internally on the API the current profile data is invalidated and will only be available after the character logs out of WoW after those changes.