Skip to content

Commit 25f02cd

Browse files
dugjasonapassant
andcommitted
Add example of how to specify API version to README (#232)
* Add example of how to specify API version * Update README.md "Intercom versions their" > "We version our" Co-Authored-By: Alexandre Passant <[email protected]>
1 parent 119b4ed commit 25f02cd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,18 @@ client.useRequestOpts({
9595

9696
Note that certain request options (such as `json`, and certain `headers` names cannot be overriden).
9797

98+
#### Setting the API version
99+
100+
We version our API (see the "Choose Version" section of the [API & Webhooks Reference](https://developers.intercom.com/intercom-api-reference/reference) for details). You can specify which version of the API to use when performing API requests using request options:
101+
102+
```node
103+
var client = new Intercom.Client({ token: 'my_token' });
104+
client.useRequestOpts({
105+
headers: {
106+
'Intercom-Version': 1.2
107+
}
108+
});
109+
```
98110

99111
## Users
100112

0 commit comments

Comments
 (0)