# Authentication · Waxpeer API

Waxpeer authenticates REST calls with the query parameter `api` (Your WAXPEER API). Do **not** send `Authorization: Bearer`.

```
GET https://api.waxpeer.com/v1/user?api={{API_KEY}}
```

Get a key at https://waxpeer.com/profile/user

## Going online (required to sell)

Now in order to go online and sell items safely you need to implement the following logic:

1. Make sure that you have enabled the collection of user data on the website under the "Sell items" tab (by default it is enabled).
2. Going online now requires a valid Steam access token because the API key functionality has been limited. You need to send it once an hour or immediately after an refresh (the token is active only 24 hours after refreshing in Steam), otherwise it will expire and all your items will be disabled from sale, and active trades will be considered stalled and may be canceled
3. We categorically recommend not to make a mobile confirmation for a created trade until you send its trade id using the callback method.
4. Online may be delayed until the access token is verified or a valid token is received. Therefore, please note that in the trade socket there is a new user_change event, in which can_p2p indicates whether you are online or not when it is changed by p2p controller.
5. If you do not want to use npm package, but will be implementing your own trade socket connection, make sure you specify the source parameter on the authentification event (auth) without which the account will not be able to get online (example: "source": "myAwesomeProject").

Token should be in base64 format and belong to your account.

## Official Node SDK

```
npm install waxpeer
```
