Importing to Google Spreadsheet via Google App Script

Hi there,
Sorry if the answer is already available, but I have dessparately searched the forum to find a specific method to Importing some or all data from to Google Spreadsheet through Google App Script.
I have attempted a basic script with athlete ID and API but always get and error message s, the latest being
Exception: Request failed for returned code 403. Truncated server response: {“status”:403,“error”:“Access denied”} (use muteHttpExceptions option to examine full response)
fetchIntervalsData @

I would be very grateful receiving some guidence or direction to existing instructions.

Thanks !

The sheet in this post gets all activities and wellness,