Skip to main content
GET
/
auth
/
token
const axios = require('axios');
const AuthenticationApiFp = require('@alohi/faxplus-api').AuthenticationApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;

const config = new Configuration({
    accessToken: accessToken,
    basePath: 'https://restapi.fax.plus/v3'
});

async function getTokenInfo() {
    const req = await AuthenticationApiFp(config).getTokenInfo();
    const resp = await req(axios);
    console.log(resp.data);
}

getTokenInfo()
{
  "token_type": "pat",
  "scopes": [
    "<string>"
  ],
  "id": "<string>",
  "name": "<string>",
  "preview": "<string>",
  "created_date": 123,
  "expiration_date": 123,
  "last_used": 123
}
const axios = require('axios');
const AuthenticationApiFp = require('@alohi/faxplus-api').AuthenticationApiFp;
const Configuration = require('@alohi/faxplus-api').Configuration;

const config = new Configuration({
    accessToken: accessToken,
    basePath: 'https://restapi.fax.plus/v3'
});

async function getTokenInfo() {
    const req = await AuthenticationApiFp(config).getTokenInfo();
    const resp = await req(axios);
    console.log(resp.data);
}

getTokenInfo()

Authorizations

Authorization
string
header
required

OAuth2 Authorization Grant

Response

Token information

token_type
enum<string>
required

Type of the token

Available options:
pat,
oauth
scopes
string[]
required

List of scopes granted to this token

id
string | null

Token ID (PAT only)

name
string | null

Token name (PAT only)

preview
string | null

Token preview string (PAT only)

created_date
integer | null

Creation timestamp in milliseconds (PAT only)

expiration_date
integer | null

Expiration timestamp in milliseconds (PAT only)

last_used
integer | null

Last used timestamp in milliseconds (PAT only)