Version: 1.0.0

Get Access Token from Refresh Token

Issue a new access token based on previously issued refresh token for OAuth 2.0 compatible providers. Client authentication can be provided directly as input, or, if supported, set as provider parameter.

Refresh Token
Client ID
Client Secret
Access Token
Expires in (seconds)
Token type
Refresh token

1. Install

npx @superfaceai/cli install oauth2/refresh-token

2. Use in your code

const { SuperfaceClient } = require('@superfaceai/one-sdk');

const sdk = new SuperfaceClient();

async function run() {
  // Load the installed profile
  const profile = await sdk.getProfile('oauth2/refresh-token');

  // Use the profile
  const result = await profile
      refreshToken: '',
      clientId: '',
      clientSecret: ''

  return result.unwrap();


3. Add providers