Q:

Download zip from github and bitbucket private repo in node

For gitlab I can download a private repo in node by simple using making an http request to:
"https://" + host + "/" + group + "/" + project + "/repository/archive.zip\?ref\=" + branch + "\&\private_token\=" + private_token;

Is this also possible for github and bitbucket?
I find a lot of curl scripts which use username and password to authenticate.
Can I also do this simply with a private token (as in gitlab)?
The repositories are private!

A:

You can do this using the GitHub Contents API. This The /get-archive-link resources will provide you a URL that you can then use curl to download the file.

Can I also do this simply with a private token (as in gitlab)?

You can and you should. Generate a personal access token with scope repo.
There's several ways to authenticate with the GitHub API. I personally prefer to use the HTTP authentication fields:
https://USER@TOKEN:api.github.com/...

