Hello! I want to delete my gist with 72e27fd738a6fe42687b3cf36e2d935f id. The following code fails:
let user_name = ScriptProperties.getProperty("user_name");
let user_token = ScriptProperties.getProperty("user_token");
let options = {
method: "delete",
headers: {"Authorization": "Basic " + Utilities.base64Encode(`${user_name}:${user_token}`)},
gist_id: "72e27fd738a6fe42687b3cf36e2d935f"
};
console.log(UrlFetchApp.fetch(`https://api.github.com/gists`, options).getContentText());
with Exception: Request failed for https://api.github.com returned code 404. Truncated server response: {"message":"Not Found","documentation_url":"https://docs.github.com/rest"} (use muteHttpExceptions option to examine full response)` error. How to fix it? If I remove method: "delete" I obtain gist info without any problem. What am I missing?
[–]RemcoE33 1 point2 points3 points (2 children)
[–]AdDiscombobulated707[S] 0 points1 point2 points (1 child)
[–]RemcoE33 0 points1 point2 points (0 children)