Skip to content

Commit

Permalink
Merge pull request #34 from apivideo/nodejs-access-token-getter
Browse files Browse the repository at this point in the history
feat(nodejs) update readme
  • Loading branch information
bot-api-video authored Oct 4, 2021
2 parents cb5ec14 + 4b32d04 commit 3418bc6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,14 @@ All you have to do is provide an API token when instantiating the ApiVideoClient
const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" });
```

### Get the access token

If you need to access the access-token value obtained using the API key, you can use the getAccessToken() method of the client:
```js
const client = new ApiVideoClient({ apiKey: "YOUR_API_TOKEN" });
const accessToken = await client.getAccessToken();
```

### Public endpoints

Some endpoints don't require authentication. These one can be called with an ApiVideoClient instantiated without API token:
Expand Down

0 comments on commit 3418bc6

Please sign in to comment.