{"id":41380442,"url":"https://github.com/levpay/infobip","last_synced_at":"2026-01-23T10:56:33.166Z","repository":{"id":57608827,"uuid":"126080107","full_name":"levpay/infobip","owner":"levpay","description":"Infobip API client library in Go","archived":false,"fork":false,"pushed_at":"2020-04-06T19:37:06.000Z","size":13,"stargazers_count":7,"open_issues_count":2,"forks_count":3,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-06-20T01:57:37.588Z","etag":null,"topics":["golang","golang-package","infobip","infobip-api","sms"],"latest_commit_sha":null,"homepage":"https://dev.infobip.com/getting-started","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/levpay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-20T20:44:42.000Z","updated_at":"2024-06-20T01:57:37.589Z","dependencies_parsed_at":"2022-08-30T09:41:47.357Z","dependency_job_id":null,"html_url":"https://github.com/levpay/infobip","commit_stats":null,"previous_names":["nuveo/infobip"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/levpay/infobip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levpay%2Finfobip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levpay%2Finfobip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levpay%2Finfobip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levpay%2Finfobip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levpay","download_url":"https://codeload.github.com/levpay/infobip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levpay%2Finfobip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28689099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T05:48:07.525Z","status":"ssl_error","status_checked_at":"2026-01-23T05:48:07.129Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","golang-package","infobip","infobip-api","sms"],"created_at":"2026-01-23T10:56:32.418Z","updated_at":"2026-01-23T10:56:33.157Z","avatar_url":"https://github.com/levpay.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# infobip\n\nInfobip API client library in Go\n\n[![Build Status](https://travis-ci.org/levpay/infobip.svg?branch=master)](https://travis-ci.org/levpay/infobip)\n[![GoDoc](https://godoc.org/github.com/levpay/infobip?status.png)](https://godoc.org/github.com/levpay/infobip)\n[![Go Report Card](https://goreportcard.com/badge/github.com/levpay/infobip)](https://goreportcard.com/report/github.com/levpay/infobip)\n\n## Usage\n\nTo initiate a client, you should use the `infobip.ClientWithBasicAuth` func. This will returns a pointer to `infobip.Client` and allows to you use features from service.\n\n### Sending a single message\n\nThe func needs a `infobip.Message` struct. That struct consists of the following attributes:\n\n| Attribute | Type | Description |\n|-----------|------|-------------|\n| From | string | Represents a sender ID which can be alphanumeric or numeric |\n| To | string | Message destination address |\n| Text | string | Text of the message that will be sent |\n\nIt has a func to validate the `From` and `To` attributes, according to Infobip docs, and it is used into all funcs that make a request to the service. The following code is a basic example of the validate func:\n\n```go\npackage main\n\nimport (\n    \"log\"\n\n    \"github.com/levpay/infobip\"\n)\n\nfunc main() {\n    m := infobip.Message{\n        From: \"Company\", // or company number\n        To:   \"41793026727\",\n        Text: \"This is an example of the body of the SMS message\",\n    }\n    err := m.Validate()\n    if err != nil {\n        log.Fatalf(\"Infobip message error: %v\", err)\n    }\n}\n```\n\nFinally, the following code is a full example to send a single message to Infobip service:\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"log\"\n\n    \"github.com/levpay/infobip\"\n)\n\nfunc main() {\n    client := infobip.ClientWithBasicAuth(\"foo\", \"bar\")\n    r, err := client.SingleMessage(m) // \"m\" refers to the variable from the previous example\n    if err != nil {\n        log.Fatalf(\"Infobip error: %v\", err)\n    }\n    fmt.Printf(\"Infobip response: %v\", r)\n}\n```\n\n### Sending a advanced message\n\nThe func needs a `infobip.BulkMessage` struct. That struct consists of the following attributes:\n\n| Attribute | Type | Description |\n|-----------|------|-------------|\n| ID | string | The ID which uniquely identifies the request |\n| Messages | slice of Message | Message values |\n\nAnd the `infobip.Message` struct consists in the following attributes:\n\n| Attribute | Type | Description |\n|-----------|------|-------------|\n| From | string | Represents a sender ID which can be alphanumeric or numeric |\n| Destinations | slice of Destination | Destination values |\n| Text | string | Text of the message that will be sent |\n| Transliteration | string | Conversion of a message text from one script to another |\n| LanguageCode | string | Code for language character set of a message text |\n\nAnd finally the `infobip.Destination` struct consists in the following attributes:\n\n| Attribute | Type | Description |\n|-----------|------|-------------|\n| ID | string | The ID that uniquely identifies the message sent |\n| To | string | Message destination address |\n\nThe following code is a basic example of the validate func:\n\n```go\npackage main\n\nimport (\n    \"log\"\n\n    \"github.com/levpay/infobip\"\n)\n\nfunc main() {\n    m := infobip.BulkMessage{\n        Messages: []infobip.Message{\n            infobip.Message{\n                From: \"Company\", // or company number\n                Destinations: []infobip.Destination{\n                    infobip.Destination{\n                        To: \"41793026727\",\n                    },\n                },\n                Text:            \"This is an example of the body of the SMS message\",\n                Transliteration: \"PORTUGUESE\",\n                LanguageCode:    \"PT\",\n            },\n        },\n    }\n    err := m.Validate()\n    if err != nil {\n        log.Fatalf(\"Infobip message error: %v\", err)\n    }\n}\n```\n\nFinally, the following code is a full example to send an advanced message to Infobip service:\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"log\"\n\n    \"github.com/levpay/infobip\"\n)\n\nfunc main() {\n    client := infobip.ClientWithBasicAuth(\"foo\", \"bar\")\n    r, err := client.AdvancedMessage(m) // \"m\" refers to the variable from the previous example\n    if err != nil {\n        log.Fatalf(\"Infobip error: %v\", err)\n    }\n    fmt.Printf(\"Infobip response: %v\", r)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevpay%2Finfobip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevpay%2Finfobip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevpay%2Finfobip/lists"}