authorizeOAuth

api.authorizeOAuth(options?) Initiates the OAuth flow that lets the addon call the public REST API on behalf of the current user. Shows a consent dialog; on approval, the SDK returns a TokenResponse with a fresh access token and its expiration. After the first authorization, the same user does not need to re-consent — the addon can fetch tokens via getOAuthAccessToken().

Arguments
argumentTypeDescription
optionsobjectOptional. Reserved for future use — currently ignored by the platform.
Schema

Return value - Promise<TokenResponse>

// Inside an addon iframe
const api = window.Addon.iframe();

const button = {
  text: 'Connect to platform API',
  callback: async () => {
    // Resolves with { access_token, expires_at } after the user grants consent.
    const { access_token, expires_at } = await api.authorizeOAuth();
    console.log('Authorized, expires at:', expires_at);
  },
};
logo
FlowFast
If you have any questions or need help with integration feel free to write us at support@flowfast.io