cryptotalkapi-token-mgmt
v1.0.4
Published
This package helps you to refresh the access token every 12 hours. You need access_token to access APIs provided by cryptotalk. All APIs are free to use. More information can be found here: https://cryptotalk.gitbook.io/
Downloads
16
Maintainers
Readme
CryptoTalk APIs Access Token Management
Get your access token and refresh token from signing up for APIs at https://cryptotalk.finance
Installation
npm install -i cryptotalkapi-token-mgmt
Usage
const _token_mgmt = require('cryptotalkapi-token-mgmt');
//You must get access and refresh token from cryptotalk API sign up
let access_token = "eyJraWQiOiJzZDV5TEk....3Mk8AuQ";
let refresh_token = "eyJjdHkiOiJKV1Q....4LTs3NBog";
//Start the refresh process - access_token is refreshed every 12 hours
_token_mgmt.startRefresh(access_token, refresh_token);
//This is how you can retrieve access token
console.log(_token_mgmt.getAccessToken());