Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 933 Bytes

File metadata and controls

34 lines (24 loc) · 933 Bytes

aiograpi-rest Examples

These examples use the same minimal session flow:

  1. Reuse AIOGRAPI_REST_SESSIONID if you already have an aiograpi-rest session.
  2. Import an Instagram sessionid cookie through POST /auth/login/by/sessionid when AIOGRAPI_REST_INSTAGRAM_SESSIONID is set.
  3. Create a new session through POST /auth/login when AIOGRAPI_REST_USERNAME and AIOGRAPI_REST_PASSWORD are set.
  4. Call GET /user/about with the saved session in X-Session-ID.

Start the API first:

docker run --rm -p 8000:8000 subzeroid/aiograpi-rest

Run the curl example:

AIOGRAPI_REST_SESSIONID="<SESSIONID>" ./examples/curl/user-about.sh

Run the Python example:

AIOGRAPI_REST_SESSIONID="<SESSIONID>" python3 examples/python/user_about.py

Run the TypeScript example with Node.js 18+:

AIOGRAPI_REST_SESSIONID="<SESSIONID>" npx --yes tsx examples/typescript/user-about.ts