{"id":19123322,"url":"https://github.com/vonage/vonage-curl-code-snippets","last_synced_at":"2025-04-05T23:10:24.781Z","repository":{"id":40354423,"uuid":"141280219","full_name":"Vonage/vonage-curl-code-snippets","owner":"Vonage","description":"Curl examples for working with Vonage APIs","archived":false,"fork":false,"pushed_at":"2025-03-26T12:10:33.000Z","size":313,"stargazers_count":26,"open_issues_count":0,"forks_count":70,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-03-29T22:08:40.965Z","etag":null,"topics":["curl","examples","nexmo","nexmo-quickstart","vonage"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Vonage.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":"audit/get-event-types.sh","citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-17T11:31:38.000Z","updated_at":"2025-03-26T12:02:36.000Z","dependencies_parsed_at":"2024-06-21T01:58:34.941Z","dependency_job_id":"24f4e932-1458-4fc7-9129-bce0a1c789c8","html_url":"https://github.com/Vonage/vonage-curl-code-snippets","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/Vonage%2Fvonage-curl-code-snippets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vonage%2Fvonage-curl-code-snippets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vonage%2Fvonage-curl-code-snippets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Vonage%2Fvonage-curl-code-snippets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Vonage","download_url":"https://codeload.github.com/Vonage/vonage-curl-code-snippets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247411235,"owners_count":20934653,"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":["curl","examples","nexmo","nexmo-quickstart","vonage"],"created_at":"2024-11-09T05:25:12.283Z","updated_at":"2025-04-05T23:10:24.752Z","avatar_url":"https://github.com/Vonage.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vonage cURL Examples\n\n\u003cimg src=\"https://developer.nexmo.com/assets/images/Vonage_Nexmo.svg\" height=\"48px\" alt=\"Nexmo is now known as Vonage\" /\u003e\n\nThis repository is a collection of cURL code snippets, demonstrating the functionality of the [Vonage APIs](https://developer.nexmo.com). The code snippets are used in the developer documentation, such as in [Send a Unicode SMS](https://developer.nexmo.com/messaging/sms/code-snippets/send-an-sms-with-unicode).\n\n## Pre-requisites\n\nYou will need [cURL](https://curl.haxx.se/) installed.\n\nIf you don't have a Vonage API account, you'll need to [create one](https://dashboard.nexmo.com/sign-up)!\n\n### Snippets That Use a JWT\n\nSome use JWT for authentication. These snippets will `source` the `jwt.sh` file, and the cURL request will contain the following header:\n\n```curl\n-H 'Authorization: Bearer '$JWT\n```\n\nThe `jwt.sh` file will generate a JWT for you using the values from the `VONAGE_APPLICATION_ID` and \n`VONAGE_PRIVATE_KEY` in your `config.sh` file. In order for `jwt.sh` to function, you must have the latest [Vonage CLI]\n(https://github.com/vonage/vonage-cli) installed locally. You can install it in the following way:\n\n```\nnpm install -g @vonage/cli\n```\n\n## Configuration\n\nYou can find the API key and secret for your configuration settings in your [Dashboard](https://dashboard.nexmo.com).\n\nThis repository contains a main configuration file `config.sh` that is referenced by the code snippets. You can directly edit the `config.sh` file to add your information. Alternatively, you can create a `config.local.sh` file, which overrides the main configuration file. This allows you to keep your specific information separate from the main configuration.\n\nNote: If you copy `config.sh` to `config.local.sh` make sure to remove the following lines from the bottom of the `config.local.sh` file:\n\n```bash\nCONFIG_DIR=$(dirname \"${BASH_SOURCE[0]}\")\nif [ -f \"$CONFIG_DIR/config.local.sh\" ]; then\n    source \"$CONFIG_DIR/config.local.sh\"\nfi\n```\n\nSome APIs use JWT authentication. For these, an Application ID and Private Key will be needed instead of you API key and secret. You can create a Vonage Application in the [Dashboard](https://dashboard.nexmo.com/applications) in order to generate the Application ID and Private Key.\n\n### Setting the Private Key Variable\n\nWhen setting the `VONAGE_PRIVATE_KEY` environement variable, copy your `private.key` file to the root directory and use an absolute path for the variable value, e.g. `\"/home/user/private.key\"`\n\n## Run the code snippets\n\nAs each code snippet requires access to the configuration files, you must run them from the directory they reside in, for example:\n\n``` shell\ncd messaging/sms/\n./send-an-sms.sh\n```\n\n## Get in touch\n\nQuestions and comments are welcome!\n\nYou can create an issue on this repository. Patches are also very welcome, please go ahead and send us fixes or additional code snippets by opening a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvonage%2Fvonage-curl-code-snippets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvonage%2Fvonage-curl-code-snippets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvonage%2Fvonage-curl-code-snippets/lists"}