Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ In the following example, replace `INSTALLATION_ACCESS_TOKEN` with an installati
curl --request GET \
--url "{% data variables.product.api_url_pre %}/meta" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer INSTALLATION_ACCESS_TOKEN"{% ifversion api-date-versioning %}\
--header "Authorization: Bearer INSTALLATION_ACCESS_TOKEN"{% ifversion api-date-versioning %} \
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If a REST API endpoint requires you to authenticate as an app, the documentation
curl --request GET \
--url "{% data variables.product.api_url_pre %}/app/installations" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer YOUR_JWT"{% ifversion api-date-versioning %}\
--header "Authorization: Bearer YOUR_JWT"{% ifversion api-date-versioning %} \
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To use a JWT, pass it in the `Authorization` header of an API request. For examp
curl --request GET \
--url "{% data variables.product.api_url_pre %}/app" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer YOUR_JWT"{% ifversion api-date-versioning %}\
--header "Authorization: Bearer YOUR_JWT"{% ifversion api-date-versioning %} \
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
```

Expand Down
2 changes: 1 addition & 1 deletion content/rest/guides/getting-started-with-the-rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ To send a header in a `curl` command, use the `--header` or `-H` flag followed b
curl --request GET \
--url "https://api.github.com/octocat" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer <em>YOUR-TOKEN</em>"{% ifversion api-date-versioning %}\
--header "Authorization: Bearer <em>YOUR-TOKEN</em>"{% ifversion api-date-versioning %} \
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
```

Expand Down
6 changes: 3 additions & 3 deletions content/rest/overview/authenticating-to-the-rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You can authenticate your request by sending a token in the `Authorization` head
```shell
curl --request GET \
--url "{% data variables.product.api_url_code %}/octocat" \
--header "Authorization: Bearer YOUR-TOKEN"{% ifversion api-date-versioning %}\
--header "Authorization: Bearer YOUR-TOKEN"{% ifversion api-date-versioning %} \
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
```

Expand Down Expand Up @@ -61,7 +61,7 @@ For example:
```shell
curl --request POST \
--url "{% data variables.product.api_url_code %}/authorizations"
--user CLIENT_ID:CLIENT_SECRET{% ifversion api-date-versioning %}\
--user CLIENT_ID:CLIENT_SECRET{% ifversion api-date-versioning %} \
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
```

Expand All @@ -80,7 +80,7 @@ If you want to use the API in a {% data variables.product.prodname_actions %} wo
```shell
curl --request GET \
--url "{% data variables.product.api_url_code %}/user"
--user USERNAME:PASSWORD{% ifversion api-date-versioning %}\
--user USERNAME:PASSWORD{% ifversion api-date-versioning %} \
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
```

Expand Down
2 changes: 1 addition & 1 deletion content/rest/overview/resources-in-the-rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ You can authenticate your request by sending a token in the `Authorization` head
```shell
curl --request GET \
--url "{% data variables.product.api_url_code %}/octocat" \
--header "Authorization: Bearer YOUR-TOKEN"{% ifversion api-date-versioning %}\
--header "Authorization: Bearer YOUR-TOKEN"{% ifversion api-date-versioning %} \
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
```

Expand Down
2 changes: 1 addition & 1 deletion data/reusables/apps/generate-installation-access-token.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
curl --request POST \
--url "{% data variables.product.api_url_pre %}/app/installations/INSTALLATION_ID/access_tokens" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer JWT"{% ifversion api-date-versioning %}\
--header "Authorization: Bearer JWT"{% ifversion api-date-versioning %} \
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
```

Expand Down
2 changes: 1 addition & 1 deletion data/reusables/apps/user-access-token-example-request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
curl --request GET \
--url "{% data variables.product.api_url_pre %}/user" \
--header "Accept: application/vnd.github+json" \
--header "Authorization: Bearer USER_ACCESS_TOKEN"{% ifversion api-date-versioning %}\
--header "Authorization: Bearer USER_ACCESS_TOKEN"{% ifversion api-date-versioning %} \
--header "X-GitHub-Api-Version: {{ allVersions[currentVersion].latestApiVersion }}"{% endif %}
```