UNPKG

@gohighlevel/api-client

Version:
55 lines 2.23 kB
import { AxiosInstance, AxiosRequestConfig } from 'axios'; import * as Models from './models/oauth'; import { UserTypeValue } from '../../constants'; /** * Oauth Service * Documentation for OAuth 2.0 API */ export declare class Oauth { private readonly MARKETPLACE_URL; private client; private config; constructor(httpClient: AxiosInstance, config?: { baseUrl?: string; }); /** * Generate OAuth authorization URL for the authorization code flow */ getAuthorizationUrl(clientId: string, redirectUri: string, scope: string): string; /** * Refresh access token using refresh token * @param refreshToken The refresh token * @param clientId OAuth client ID * @param clientSecret OAuth client secret * @param grantType Grant type (must be 'refresh_token') * @param userType User type (UserType.Location or UserType.Company) */ refreshToken(refreshToken: string, clientId: string, clientSecret: string, grantType: 'refresh_token', userType: UserTypeValue | string): Promise<any>; /** * Get Access Token * Use Access Tokens to access GoHighLevel resources on behalf of an authenticated location/company. */ getAccessToken(requestBody: Models.GetAccessCodebodyDto, options?: AxiosRequestConfig): Promise<Models.GetAccessCodeSuccessfulResponseDto>; /** * Get Location Access Token from Agency Token * This API allows you to generate locationAccessToken from AgencyAccessToken */ getLocationAccessToken(requestBody: Models.GetLocationAccessCodeBodyDto, options?: AxiosRequestConfig): Promise<Models.GetLocationAccessTokenSuccessfulResponseDto>; /** * Get Location where app is installed * This API allows you fetch location where app is installed upon */ getInstalledLocation(params: { skip?: string; limit?: string; query?: string; isInstalled?: boolean; companyId: string; appId: string; versionId?: string; onTrial?: boolean; planId?: string; }, options?: AxiosRequestConfig): Promise<Models.GetInstalledLocationsSuccessfulResponseDto>; } export default Oauth; //# sourceMappingURL=oauth.d.ts.map