I am following the hello world here:
https://developers.google.com/apps-script/guides/rest/quickstart/target-script
Then I update the script with new features and publish it as a new version (v2) with Publish -> Deploy as API executable
With this v2 my execution API client (using (Java)[https://developers.google.com/apps-script/guides/rest/quickstart/java]) fails with an authentification error:
com.google.api.client.googleapis.json.GoogleJsonResponseException: 401 Unauthorized
How can I get my Java client to deal properly with versioned google apps scripts?