{"id":16216258,"url":"https://github.com/matthewhartstonge/iid","last_synced_at":"2026-03-10T00:01:33.464Z","repository":{"id":244338965,"uuid":"814953062","full_name":"matthewhartstonge/iid","owner":"matthewhartstonge","description":"Bulk import existing iOS APNs tokens to Firebase Cloud","archived":false,"fork":false,"pushed_at":"2025-03-09T21:33:29.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T13:42:52.797Z","etag":null,"topics":["apns","fcm","google","iid","push-notifications"],"latest_commit_sha":null,"homepage":"","language":"Go","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/matthewhartstonge.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-06-14T03:45:54.000Z","updated_at":"2025-03-09T21:33:23.000Z","dependencies_parsed_at":"2024-06-19T02:47:39.587Z","dependency_job_id":"122ecf6d-826b-4200-9765-a3322713518c","html_url":"https://github.com/matthewhartstonge/iid","commit_stats":null,"previous_names":["matthewhartstonge/iid"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewhartstonge%2Fiid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewhartstonge%2Fiid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewhartstonge%2Fiid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matthewhartstonge%2Fiid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matthewhartstonge","download_url":"https://codeload.github.com/matthewhartstonge/iid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247744283,"owners_count":20988781,"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":["apns","fcm","google","iid","push-notifications"],"created_at":"2024-10-10T11:18:53.057Z","updated_at":"2026-03-10T00:01:28.404Z","avatar_url":"https://github.com/matthewhartstonge.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Google Instance ID (FCM Batch APNs Token Import)\n\nProvides a client to bulk import existing iOS APNs tokens to Firebase Cloud\nMessaging using Google's [Instance ID batch import endpoint.](https://developers.google.com/instance-id/reference/server#create_registration_tokens_for_apns_tokens) \n\nNote, this is a deprecated Google API, so there is no guarantee this will work in the future.\n\nIf I get a report it's no longer working, I'll archive the project. ✌️\n\n## Installation\n\n```shell\ngo get github.com/matthewhartstonge/iid\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/matthewhartstonge/iid\"\n)\n\nfunc main() {\n\tjsonCreds, err := os.ReadFile(\"path-to-firebase-service-account-json.credentials\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tclient, err := iid.New(\"com.example.app\", jsonCreds, iid.WithSandbox())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tres, err := client.BatchImport(context.Background(), []string{\"MY_APNS_TOKEN\"})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfor _, item := range res {\n\t\tfmt.Println(item)\n\t}\n}\n```\n\n## Firebase Credentials\n\nYou will require using Firebase service account credentials which can be \ndownloaded from the Google Cloud Console as a JSON encoded file.\n\nYou will need to:\n\n- Choose your Firebase Project from the Project dropdown selector (top left).\n- Select and click on `IAM \u0026 Admin` \u003e `Service accounts` from the side menu.\n- Click on your `Firebase Admin SDK Service Agent` account within the presented table.\n- Click on the 'keys' tab.\n- Click 'Add Key' \u003e 'Create New Key'.\n- Choose key type `JSON`, and click 'create'.\n- Download and use the JSON file as your service account credentials.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewhartstonge%2Fiid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatthewhartstonge%2Fiid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatthewhartstonge%2Fiid/lists"}