click2money-webmaster-api
v2.0.1
Published
click2money API integration
Readme
click2money API Integration
Installation
To use the library, install it through npm
npm install --save click2money-webmaster-apiUsage
const Click2moneyApi = require('click2money-webmaster-api');
const api = new Click2moneyApi(webmasterId, token);
let balance = await api.getBalance();API
- getBalance(): Object
- getOffersData(Array< offerId >?, Object filter?): Object
- getSubscriptions(Array< offerId >?): Object
- getOfferLinkByOfferId(int offerId): Object
- getStatisticsOffers(timestamp dateFrom, timestamp dateTo, int offerId?, string subid?, Array group?): Object
- createStream(int offerId): Object
- apiRequest(method, params) - native click2money api request
How to get token
You need to login to c2m official site and grab token from request
POST https://api2.click2.money/api/v2.1/Auth/Login
Token will be in the response body.accessToken
