#help (2023-01)
Where to get help about getting help!
2023-01-16
![omkarhalankar avatar](https://secure.gravatar.com/avatar/7b3a0f2f60d1f61f0d6003331ba2607b.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0014-72.png)
hi @Erik Osterman (Cloud Posse) I am using GitHub Enterprise and trying to figure out what exactly is GITHUB_UPLOAD_URL / uploadURL ? can anyone help me around this? This seems to be a mandatory flag while using baseURL Anyone who can help me with this ?
![Erik Osterman (Cloud Posse) avatar](https://secure.gravatar.com/avatar/88c480d4f73b813904e00a5695a454cb.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0023-72.png)
Please provide context :-) is this a GitHub Action or terraform module?
![omkarhalankar avatar](https://secure.gravatar.com/avatar/7b3a0f2f60d1f61f0d6003331ba2607b.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0014-72.png)
sorry for that. @Erik Osterman (Cloud Posse) its about https://github.com/cloudposse/github-commenter since I’m using GitHub Enterprise for GitHub Commenter and will be passing BaseURL , its mandatory to pass Upload URL. The description in the documentation around Upload URL doesnt give me a clear picture what exactly it requires. Some example will be helpful.
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
base URL and upload URL are for GitHub enterprise
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
// NewEnterpriseClient returns a new GitHub API client with provided
// base URL and upload URL (often is your GitHub Enterprise hostname).
// If the base URL does not have the suffix "/api/v3/", it will be added automatically.
// If the upload URL does not have the suffix "/api/uploads", it will be added automatically.
// If a nil httpClient is provided, a new http.Client will be used.
//
// Note that NewEnterpriseClient is a convenience helper only;
// its behavior is equivalent to using NewClient, followed by setting
// the BaseURL and UploadURL fields.
//
// Another important thing is that by default, the GitHub Enterprise URL format
// should be http(s)://[hostname]/api/v3/ or you will always receive the 406 status code.
// The upload URL format should be http(s)://[hostname]/api/uploads/.
func NewEnterpriseClient(baseURL, uploadURL string, httpClient *http.Client) (*Client, error) {
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
GitHub Enterprise Cloud expects the asset data in its raw binary form, rather than JSON. You will send the raw binary content of the asset as the request body
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
for GH Enterprise, the base URL is different
The baseURL of the public facing API is simply: <https://api.github.com/>"
However for enterprise Github instances the baseURL for the API is slightly different: https://github.com/api/v3/"
Using a baseURL without the /api/v3/ suffix will result in HTTP 406 Not Acceptable errors and lead you down a path of debugging Oauth clients and request headers. I learnt this after many hours and tears.
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
and it requires a separate upload URL to upload assets in binary format
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
so base URL is your GitHub Enterprise hostname + /api/v3/
![Andriy Knysh (Cloud Posse) avatar](https://avatars.slack-edge.com/2018-06-13/382332470551_54ed1a5d986e2068fd9c_72.jpg)
the upload URL is your GitHub Enterprise hostname + /api/uploads/
![omkarhalankar avatar](https://secure.gravatar.com/avatar/7b3a0f2f60d1f61f0d6003331ba2607b.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0014-72.png)
Thanks @Andriy Knysh (Cloud Posse)! this is helpful.