These examples use the same minimal session flow:
- Reuse
AIOGRAPI_REST_SESSIONIDif you already have an aiograpi-rest session. - Import an Instagram
sessionidcookie throughPOST /auth/login/by/sessionidwhenAIOGRAPI_REST_INSTAGRAM_SESSIONIDis set. - Create a new session through
POST /auth/loginwhenAIOGRAPI_REST_USERNAMEandAIOGRAPI_REST_PASSWORDare set. - Call
GET /user/aboutwith the saved session inX-Session-ID.
Start the API first:
docker run --rm -p 8000:8000 subzeroid/aiograpi-restRun the curl example:
AIOGRAPI_REST_SESSIONID="<SESSIONID>" ./examples/curl/user-about.shRun the Python example:
AIOGRAPI_REST_SESSIONID="<SESSIONID>" python3 examples/python/user_about.pyRun the TypeScript example with Node.js 18+:
AIOGRAPI_REST_SESSIONID="<SESSIONID>" npx --yes tsx examples/typescript/user-about.ts