Skip to content

Commit 894810f

Browse files
authored
updating the readme - create access token
1 parent e407689 commit 894810f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
Ebay API Client for node js.
44

5+
The intent is to simplify the request process by handling the tedious logic. It's a thin wrapper around eBay Api.
56

67
[![npm version](https://badge.fury.io/js/ebay-node-api.svg)](https://badge.fury.io/js/ebay-node-api)
78
[![Build Status](https://travis-ci.org/ajay2507/ebay-node-api.svg?branch=master)](https://travis-ci.org/ajay2507/ebay-node-api)
@@ -36,6 +37,26 @@ Register your app here https://go.developer.ebay.com/quick-start-guide.
3637
- `details` - optional(`Boolean`) - Get User Details functionality - true, if you need details about the user.
3738

3839
#### Example
40+
41+
## GetAccessToken
42+
43+
```javascript
44+
const Ebay = require('../src/index');
45+
46+
let ebay = new Ebay({
47+
clientID: "--Client Id----",
48+
clientSecret: '-- Client Secret --',
49+
body: {
50+
grant_type: "client_credentials"
51+
}
52+
});
53+
ebay.getAccessToken().then((data) => {
54+
console.log(data); // data.access_token
55+
}, (error) => {
56+
console.log(error);
57+
});
58+
```
59+
3960
## FetchItemsByKeyword
4061
```javascript
4162
const Ebay = require("ebay-node-api");
@@ -57,6 +78,8 @@ All test files are present inside test folder. You can run using
5778
```javascript
5879
npm run test
5980
```
81+
## Issues:
82+
If you are facing any issues, you can create the issues [here](https://github.com/ajay2507/ebay-node-api/issues).
6083

6184

6285
## Examples:

0 commit comments

Comments
 (0)