{"id":13767528,"url":"https://github.com/lens-protocol/api-examples","last_synced_at":"2025-04-05T15:10:10.029Z","repository":{"id":38047223,"uuid":"467601444","full_name":"lens-protocol/api-examples","owner":"lens-protocol","description":"Code examples of how to speak to the Lens API","archived":false,"fork":false,"pushed_at":"2024-05-01T12:28:15.000Z","size":3050,"stargazers_count":267,"open_issues_count":18,"forks_count":99,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-29T14:12:47.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lens-protocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-08T16:59:17.000Z","updated_at":"2025-03-09T15:33:56.000Z","dependencies_parsed_at":"2023-10-11T10:48:51.857Z","dependency_job_id":"8c919b17-e9d5-474f-8fc7-654395a08887","html_url":"https://github.com/lens-protocol/api-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Fapi-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Fapi-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Fapi-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lens-protocol%2Fapi-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lens-protocol","download_url":"https://codeload.github.com/lens-protocol/api-examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247353749,"owners_count":20925329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T16:01:09.441Z","updated_at":"2025-04-05T15:10:10.011Z","avatar_url":"https://github.com/lens-protocol.png","language":"TypeScript","funding_links":[],"categories":["Learn"],"sub_categories":["Examples"],"readme":"# Lens API\r\n\r\nThis repo has running code which you can execute to help you understand how to interact with the Lens API.\r\n\r\nLens API is beta at the moment and can change without warning!\r\n\r\nFull documentation is available at [https://docs.lens.dev/docs/introduction](https://docs.lens.dev/docs/introduction).\r\n\r\n## Setup\r\n\r\nfor the scripts to run you need to create a `.env` (or copy the template `cp .env.template .env`) file with these variables:\r\n\r\n```\r\nPK=YOUR_PK\r\nMUMBAI_RPC_URL=https://rpc-mumbai.matic.today\r\nPROFILE_ID=PROFILE_ID\r\nLENS_API=https://api-mumbai.lens.dev/\r\nLENS_HUB_CONTRACT=0xC1E77eE73403B8a7478884915aA599932A677870\r\nLENS_PERIPHERY_CONTRACT=0xc3a1fabd7f8d290f7b0C45AA88af6e9c9E267843\r\nINFURA_PROJECT_ID=YOUR_INFURA_PROJECT_ID\r\nINFURA_SECRET=YOUR_INFURA_SECRET\r\n```\r\n\r\n- `PROFILE_ID` is optional but required on some endpoints! Also, make sure to insert the `PROFILE_ID` in hexadecimal format.\r\n- Highly advised to create an API key and use the Alchemy RPC provider for Mumbai to avoid rate limiting. -`PK` represents Private key here.\r\n- This project uses infura ipfs to pin content which now is API keys only so you have to create an API key on their side. You can also use another storage provider or pinning service if you which, feel free to do a PR with that service and we can change the .env to include option to pick.\r\n\r\n## How to run\r\n\r\nAlways make sure you `npm install` beforehand.\r\n\r\nlook in the `package.json` file for the `scripts` section you see all the scripts you can run. This is prefixed with `resolver:method`.\r\n\r\nexample running:\r\n\r\n```bash\r\n$ npm run authentication:login\r\n```\r\n\r\n## Issues\r\n\r\nIf you have any issues with the API or want a new endpoint please create an issue!\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flens-protocol%2Fapi-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flens-protocol%2Fapi-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flens-protocol%2Fapi-examples/lists"}