More context: When I add it as a library and want to call ex. onEdit(e), it returns a permission error:
"Exception: You do not have permission to call SpreadsheetApp.openById. Required permissions: https://www.googleapis.com/auth/spreadsheets"
The permission scope https://www.googleapis.com/auth/spreadsheets is already in the application.json file.