{"id":26093860,"url":"https://github.com/ngrok/ngrok-api-go","last_synced_at":"2026-01-24T01:19:07.196Z","repository":{"id":42398719,"uuid":"367490735","full_name":"ngrok/ngrok-api-go","owner":"ngrok","description":"ngrok API client library for Golang","archived":false,"fork":false,"pushed_at":"2025-05-21T22:29:04.000Z","size":418,"stargazers_count":53,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-22T07:35:58.182Z","etag":null,"topics":["go","golang","ngrok","reverse-proxy"],"latest_commit_sha":null,"homepage":"https://ngrok.com","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ngrok.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null}},"created_at":"2021-05-14T22:13:38.000Z","updated_at":"2025-05-21T22:29:04.000Z","dependencies_parsed_at":"2024-02-08T01:22:59.368Z","dependency_job_id":"2bc13fa7-84ae-4759-9ae4-a70467a4efdf","html_url":"https://github.com/ngrok/ngrok-api-go","commit_stats":{"total_commits":31,"total_committers":7,"mean_commits":4.428571428571429,"dds":0.3870967741935484,"last_synced_commit":"68e787aca7329c065fca859874d0b01dd482bc83"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/ngrok/ngrok-api-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngrok%2Fngrok-api-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngrok%2Fngrok-api-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngrok%2Fngrok-api-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngrok%2Fngrok-api-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngrok","download_url":"https://codeload.github.com/ngrok/ngrok-api-go/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngrok%2Fngrok-api-go/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262725158,"owners_count":23354419,"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":["go","golang","ngrok","reverse-proxy"],"created_at":"2025-03-09T12:05:54.116Z","updated_at":"2026-01-24T01:19:07.191Z","avatar_url":"https://github.com/ngrok.png","language":null,"funding_links":[],"categories":["Others"],"sub_categories":[],"readme":"\u003c!-- Code generated for API Clients. DO NOT EDIT. --\u003e\n\n# ngrok API client library for Golang\n[![CI](https://github.com/ngrok/ngrok-api-go/actions/workflows/ci.yml/badge.svg)](https://github.com/ngrok/ngrok-api-go/actions/workflows/ci.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/ngrok/ngrok-api-go.svg)](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v7)\n\nThis library wraps the [ngrok HTTP API](https://ngrok.com/docs/api) to make it\neasier to consume in Go.\n\nFor creating ngrok tunnels directly from your Go application, check out the [ngrok Go Agent SDK](https://github.com/ngrok/ngrok-go) instead.\n\n## Installation\n\nInstallation is as simple as using `go get`.\n\n    go get github.com/ngrok/ngrok-api-go/v7\n\n## Support\n\nThe best place to get support using this library is through the [ngrok Slack Community](https://ngrok.com/slack). If you find any bugs, please contribute by opening a [new GitHub issue](https://github.com/ngrok/ngrok-api-go/issues/new/choose).\n\n## Documentation\n\nA quickstart guide and a full API reference are included in the [ngrok go API documentation on pkg.go.dev](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v7)\n\n## Quickstart\n\nPlease consult the [documentation](https://pkg.go.dev/github.com/ngrok/ngrok-api-go/v7) for additional examples.\n\n### Create an IP Policy that allows traffic from some subnets\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/ngrok/ngrok-api-go/v7\"\n\t\"github.com/ngrok/ngrok-api-go/v7/ip_policies\"\n\t\"github.com/ngrok/ngrok-api-go/v7/ip_policy_rules\"\n)\n\nfunc main() {\n\tfmt.Println(example(context.Background()))\n}\n\nfunc example(ctx context.Context) error {\n\t// create clients to api resources\n\tclientConfig := ngrok.NewClientConfig(os.Getenv(\"NGROK_API_KEY\"))\n\tpolicies := ip_policies.NewClient(clientConfig)\n\tpolicyRules := ip_policy_rules.NewClient(clientConfig)\n\n\t// create the ip policy\n\tpolicy, err := policies.Create(ctx, \u0026ngrok.IPPolicyCreate{})\n\tif err != nil {\n\t\treturn err\n\t}\n\tfmt.Println(policy)\n\n\t// create rules for each cidr\n\tfor _, cidr := range []string{\"24.0.0.0/8\", \"12.0.0.0/8\"} {\n\t\trule, err := policyRules.Create(ctx, \u0026ngrok.IPPolicyRuleCreate{\n\t\t\tCIDR:       cidr,\n\t\t\tIPPolicyID: policy.ID,\n\t\t\tAction:     ngrok.String(\"allow\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tfmt.Println(rule)\n\t}\n\treturn nil\n}\n```\n\n### List all online tunnels\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/ngrok/ngrok-api-go/v7\"\n\t\"github.com/ngrok/ngrok-api-go/v7/tunnels\"\n)\n\nfunc main() {\n\tfmt.Println(example(context.Background()))\n}\n\nfunc example(ctx context.Context) error {\n\t// construct the api client\n\tclientConfig := ngrok.NewClientConfig(os.Getenv(\"NGROK_API_KEY\"))\n\n\t// list all online tunnels\n\ttunnels := tunnels.NewClient(clientConfig)\n\titer := tunnels.List(nil)\n\tfor iter.Next(ctx) {\n\t\tfmt.Println(iter.Item())\n\t}\n\tif err := iter.Err(); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngrok%2Fngrok-api-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngrok%2Fngrok-api-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngrok%2Fngrok-api-go/lists"}