{"id":37136277,"url":"https://github.com/exotel/goapi","last_synced_at":"2026-01-14T15:53:08.076Z","repository":{"id":57522825,"uuid":"47175004","full_name":"exotel/goapi","owner":"exotel","description":"Exotel Platform api client in golang","archived":false,"fork":false,"pushed_at":"2018-10-29T03:56:32.000Z","size":51,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-06-20T12:16:48.432Z","etag":null,"topics":["call","cloud","exotel","golang"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exotel.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":"2015-12-01T08:07:20.000Z","updated_at":"2018-10-29T03:56:34.000Z","dependencies_parsed_at":"2022-09-26T18:00:49.062Z","dependency_job_id":null,"html_url":"https://github.com/exotel/goapi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/exotel/goapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exotel%2Fgoapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exotel%2Fgoapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exotel%2Fgoapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exotel%2Fgoapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exotel","download_url":"https://codeload.github.com/exotel/goapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exotel%2Fgoapi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28425512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T15:24:48.085Z","status":"ssl_error","status_checked_at":"2026-01-14T15:23:41.940Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["call","cloud","exotel","golang"],"created_at":"2026-01-14T15:53:07.270Z","updated_at":"2026-01-14T15:53:08.057Z","avatar_url":"https://github.com/exotel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"goexotel [![GoDoc](https://godoc.org/github.com/exotel/goapi?status.svg)](https://godoc.org/github.com/exotel/goapi)\u0026nbsp;[![Join the chat at https://gitter.im/exotel/goapi](https://badges.gitter.im/exotel/goapi.svg)](https://gitter.im/exotel/goapi?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\u0026nbsp;![Report Card](https://goreportcard.com/badge/github.com/exotel/goapi)\n------------\n\n\n**[Deprecated] - The REST service used here is not active any more**\n\n\n#### What is it?\n\n  GoExotel is a exotel platform api client written in golang\n\n#### resources\n\n* Account\n* IncomingPhoneNumber  \n* OutgoingCallerID  \n* AvailablePhoneNumber\n* Call  \n* Recording\n\n#### how to use\n\nInstall the library using `go get`\n```\ngo get github.com/exotel/goapi\n```\n\nor for keeping the version number\n```\ngo get gopkg.in/exotel/goapi.v0 //for version v0.x.x\n```\n\n##### using the client\n\ninitiate the client\n```\ncredentials := types.Credentials{\n  UserCredentials:   types.UserCredentials{AccessToken: \"APIAccessToken\", UserName: \"APIUsername\"},\n  ClientCredentials: types.ClientCredentials{ClientID: \"CLIENT_id\", ClientSecret: \"CLIENT_SECRET\"},\n}\nclient = api.New(credentials)\nclient.SetAccountSid(\"\u003cACCOUNT_SID\u003e\") //parent working\n```\n\nfor adding a sub account\n\n```\nc := client.\n  Account().\n  Create().\n  Details(resources.AccountDetails{FriendlyName: \"SARATH TESTING\", CountryCode: \"SNG\"})\nif status, data, err := c.Do(); err != nil {\n  fmt.Printf(err.Error())\n} else {\n  fmt.Printf(\"No Error occured while doing the operation\\nstatus : %d\\ndata%v\", status, data)\n}\n```\n\n\n##### For any resource do the following\n\nconsider resource is  `Resource` and the CRUD is allowed for `Resource`\n\n1 . Create Request\n```\nclient.Resource().Create().Details(resources.ResourceDetails{}).Do\n```  \n2 . Read Request\n* bulk\n```\nclient.Resource().Get().Filter(resources.ResourceFilter{}).Do()\n```\n* Single\n```\nclient.Resource().ID(string).Get().Do\n```\n\n3 . Update Request\n```\nclient.Resource().ID(string).Update().UpdateDetails(resources.ResourceUpdatableDetails{}).Do\n```\n\n\n4 . Delete Request\n```\nclient.Resource().ID(string).Delete().Do()\n```\n\n\n\n\n#### Sample Code\n\n```\npackage main\n\nimport (\n\t\"fmt\"\n\n\tapi \"github.com/exotel/goapi\"\n\t\"github.com/exotel/goapi/assets/types\"\n\t\"github.com/exotel/goapi/resources\"\n)\n\nfunc initClient() (client *api.Client) {\n\tcredentials := types.Credentials{\n\t\tUserCredentials:   types.UserCredentials{AccessToken: \"APIAccessToken\", UserName: \"APIUsername\"},\n\t\tClientCredentials: types.ClientCredentials{ClientID: \"CLIENT_id\", ClientSecret: \"CLIENT_SECRET\"},\n\t}\n\tclient = api.New(credentials)\n\tclient.SetAccountSid(\"\u003cACCOUNT_SID\u003e\") //parent working\n\treturn\n}\n\n\n//ExampleCall Create call example\nfunc ExampleCall(client *api.Client) {\n\tvar callDetails resources.CallDetails\n\tcallDetails.From = \"+918030752401\"\n\tcallDetails.To = \"+919742033616\"\n\tcallDetails.URL = \"http://98ae7c6f.ngrok.io/dial/+919742033616\"\n\tcallDetails.Method = \"GET\"\n\n\tif status, data, err := client.Debug(true).Call().Create().Details(callDetails).Do(); err != nil {\n\t\tfmt.Println(\"error occured\", err.Error())\n\n\t} else {\n\t\tfmt.Printf(\"No Error occured while doing the operation\\nstatus : %d\\ndata%v\", status, data)\n\t}\n}\n\nfunc main() {\n\tclient := initClient()\n  //makes a call\n\tExampleCall(client)\n}\n\n```\n\n\n\n#### What if i don't have go installed ?\n\nThis is how you can install go in linux [this is for version 1.8 of golang]\n```\nwget https://storage.googleapis.com/golang/go1.8.linux-amd64.tar.gz\ntar -C /usr/local -xzf go1.5.2.linux-amd64.tar.gz\nexport PATH=$PATH:/usr/local/go/bin\n```\n\nnow you have go installed,try checking by checking the version\n```\ngo version\n```\n\nNow you have to set the Workspace,say you are setting,~/go as the worksapce\nthis is how it is done\n```\nexport GOPATH=$HOME/go\nexport GOROOT=/usr/local/go\n```\n\nAdd these two  export statements in ~/.bashrc so that it is set all the time\nNow you are ready to test goapi,get the library using go get\nie,\n```\ngo get github.com/exotel/goapi\n```\n\nNow you can copy paste the sample codes from example folder to `path/to/filename.go` and test by running as\n```\ngo run path/to/filename.go\n````\n\n\n#### contributions\nsarath@exotel.in\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexotel%2Fgoapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexotel%2Fgoapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexotel%2Fgoapi/lists"}