GPM Login
GPM Login is a popular anti-detect browser. The SDK provides a built-in adapter.
Setup
import {
AntidetectBaseFlow, AntidetectProvider,
FlowLogger, IScriptContext,
} from '@hira-core/sdk'
export default class MyFlow extends AntidetectBaseFlow<typeof config> {
constructor(provider: AntidetectProvider = AntidetectProvider.GPM) {
super(provider, new FlowLogger('MyFlow'), config)
}
}GPM must be running locally. Default API:
http://127.0.0.1:19995
How it works
- SDK calls GPM API to start a profile → GPM launches a Chromium browser
- SDK connects via Puppeteer using the remote debugging address
- When the profile finishes, SDK calls GPM API to close the profile
GPM API Endpoints Used
| Action | Endpoint |
|---|---|
| List profiles | GET /api/v3/profiles |
| Start profile | POST /api/v3/profiles/start |
| Close profile | DELETE /api/v3/profiles/close/{id} |
Example 1 — Basic GPM flow
export default class GpmFlow extends AntidetectBaseFlow<typeof config> {
constructor(provider: AntidetectProvider = AntidetectProvider.GPM) {
super(provider, new FlowLogger('GpmFlow'), config)
}
async script(context: IScriptContext<typeof config>) {
const browser = new BrowserUtils(context)
// GPM profile is already opened and connected
context.logger.info(`Profile: ${context.profile.name}`)
context.logger.info(`Proxy: ${context.profile.raw_proxy}`)
await browser.goto('https://example.com')
// ... your automation
}
}Custom API URL
If GPM is running on a different port, set the environment variable in .env:
GPM_API_URL=http://127.0.0.1:20000Last updated on