Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now
Build the future of communications.
Start building for free

Java posts

  • By Nida Khan
    How to Create REST APIs with Java and Spring Boot header - How to Create REST APIs with Java and Spring Boot

    I’ve been using Twilio’s REST APIs for quite some time now. I was always amazed to see how REST APIs are used in establishing communication between client and server over HTTP. You call an API, which calls the server. The server then performs the whole business logic and returns the result.

    I always wanted to know how these APIs are developed so that I can create APIs myself. This led me to explore various frameworks such as Spring Boot. After developing several REST APIs using Spring Boot, I decided to write this tutorial to help beginners get started with Spring Boot.

    In this tutorial, you will develop REST APIs in Spring Boot to perform CRUD operations on an employee database.

    Prerequisites

    Read More
  • By Diane Phan
    How to Integrate Ngrok in a Twilio Java Application header - How to Integrate Ngrok in a Twilio Java Application

    When you are developing an application that uses Twilio services you need to expose your webhooks on public URLs that can be reached by Twilio. If you have followed some of the tutorials that we published on this blog you know that we recommend using the excellent ngrok tool to generate temporary public URLs for your development web server. Ngrok is an incredibly useful tool that creates a tunnel from a URL on the ngrok.io domain to your application running on your computer. You can then configure your webhook using the ngrok URL and when Twilio sends a request to it, ngrok redirects it to your application.

    If you use ngrok frequently enough, it pays off to become a paid customer, which allows you to secure a permanent URL.

    In this article I’m going to show you how to fully automate ngrok by incorporating it into your Java application. …

    Read More
  • By Diane Phan
    How to Set Up Environment Variables in IntelliJ IDEA header - How to Set Up Environment Variables in IntelliJ IDEA

    In this article, you will learn how to navigate the Java IntelliJ IDEA to configure environment variables necessary for your project.

    Tutorial Requirements

    Start a new Java project in IntelliJ IDEA

    Open IntelliJ IDEA and click on Create New Project.

    Choose Gradle on the left hand side, check Java in the box on the right hand side, and click Next.

    choose gradle option for new java project

    Give your project a name such as "sms_variables" and click the Finish button.

    After the project setup is complete and the build has succeeded, your project …

    Read More
  • By Diane Phan
    Start a Ghost Writing Career for Halloween with OpenAI's GPT-3 Engine and Java header - Start a Ghost Writing Career for Halloween with OpenAI's GPT-3 Engine and Java

    Illustration by Caroline.

    It can be tempting to stay inside with a cup of hot cocoa to read as the days get chillier. Why not challenge yourself by writing some code along with a new story this fall season?

    In this article, you will learn how to navigate a Java IDE to build a ghost writing application in Java with the OpenAI GPT-3 engine.

    Tutorial Requirements

    Start a new Java project in IntelliJ IDEA

    Open IntelliJ IDEA and click on Create New Project.

    Choose Gradle on the left hand side, check Java in the box on the right hand side, and click Next.

    choose gradle option for new java project

    Give your project a name such as "GhostWriter" …

    Read More
  • By Matthew Setter
    Working with Environment Variables in Java Working with Environment Variables in Java

    Environment variables are a great way to configure Java applications without having to explicitly store settings in code, such as for database and caching servers, or for third-party APIs.

    Keeping such settings outside of the code has several distinct advantages:

    • Avoids the need to update and recompile code when settings change
    • Helps prevent exposing sensitive credentials, such as usernames and passwords, and deployment tokens
    • You can deploy the same code in multiple environments

    In this short article, I'm going to show you some of the ways of working with environment variables in Java.

    How to access environment variables in Java

    One of the most common ways is to use System.getenv(), which accepts an optional String argument. Based on whether a String argument is passed, a different value is returned from the method. Specifically:

    If a String is passed and it matches a key in the internal environment Map, …

    Read More
  • By Diane Phan
    How to Send an SMS With Spark and Java How to Send an SMS With Spark and Java

    Twilio is all about powering communication and doing it conveniently and quickly in any language.

    With the help of the Twilio SMS API, Java, and the Spark framework, you can respond to all incoming SMS with a text message. This article will help you set up a Spark application with a lightweight framework allowing you to be more productive in expanding and developing the project further.

    In this article, you will learn how to navigate a Java IDE to set up and build a Java Spark application and send an SMS to your mobile device.

    Tutorial requirements

    Read More
  • By Matthew Gilliard
    Gruppen-SMS mit Twilio und Java Gruppen-SMS mit Twilio und Java

    Hallo und Danke fürs Lesen! Dieser Blogpost ist eine Übersetzung von Group SMS with Twilio and Java. Während wir unsere Übersetzungsprozesse verbessern, würden wir uns über Dein Feedback an help@twilio.com freuen, solltest Du etwas bemerken, was falsch übersetzt wurde. Wir bedanken uns für hilfreiche Beiträge mit Twilio Swag :)

    Das Leben ist kompliziert genug. Da wollen wir nicht noch Nachrichten zwischen Freunden und Familienmitgliedern weiterleiten müssen, damit auch alle immer auf dem Laufenden sind. In diesem Beitrag erläutere ich, wie ich eine Twilio-Nummer eingerichtet habe, die ich als „meine“ Telefonnummer an die Schulen meiner Kinder weitergab. Ich wollte, dass alle Nachrichten, die an und von dieser Nummer gesendet werden, automatisch an mich und meine Frau weitergeleitet werden und einer von uns antworten kann. Bestimmt kannst du dir Situationen in deinem eigenen Leben vorstellen, in denen das praktisch sein könnte: Paketlieferungen, Party-Planung, Terminerinnerungen – die Liste ist lang.

    In diesem …

    Read More
  • By Diane Phan
    How to Run Ngrok Using Java header - How to Use Java Servlets with Ngrok

    Java programmers can benefit from using servlets because they provide an opportunity to understand low-level concepts in Java. Servlets are also great for building interactive web applications and dynamic web pages because they extend apps hosted by web servers. They handle HTTP requests between a browser and any client, database, or application on the HTTP server.

    However, building a local servlet is just the first step. Taking the servlet a step further to communicate with a temporary public domain can allow developers to use webhooks, share a working demo of the project, and more.

    In this article, you will learn how to build and run a servlet to host your Java application and expose it publicly to the web.

    Prerequisites

    Install ngrok

    Ngrok is a great tool because it allows you to create a temporary public domain that redirects HTTP requests …

    Read More
  • By Diane Phan
    How to Start Your First Java Spark App header - How to Start Your First Java Spark App

    Setting up a new project to hack together an idea shouldn't be a problem, especially with the help of the Spark framework. Not only does this lightweight framework allow developers to be more productive with minimal boilerplate, but explore REST APIs at the same time.

    In this article, you will learn how to navigate a Java IDE to set up and build a Java Spark application.

    Tutorial requirements

    Start a new Java project in IntelliJ

    Open IntelliJ Idea and click on Create New Project.

    IntelliJ IDEA home screen

    Choose Gradle on the left hand side a …

    Read More
  • By Matthew Gilliard
    Transcription live avec Twilio Media Streams, Azure cognitive Services et Java Transcription en direct avec Twilio Media Streams, Azure cognitive Services et Java

    Twilio Media Streams peut être utilisé pour diffuser des données audio en temps réel d'un appel téléphonique vers votre serveur à l'aide de WebSockets. Associé à un système de synthèse vocale, il peut être utilisé pour générer une transcription en temps réel d'un appel téléphonique. Dans ce post, je vais vous montrer comment configurer un serveur Java WebSocket pour gérer les données audio de Twilio Media Streams et utiliser Azure cognitive Services Speech pour la transcription.

    Prérequis

    Pour suivre ce tutoriel, vous devez disposer des éléments suivants :

    Si vous souhaitez passer à l'étape suivante, vous pouvez trouver le code complété dans mon répertoire sur GitHub.

    Mise en route

    Pour qu'un projet Web Java soit rapidement opérationnel, je vous recommande d'utiliser …

    Read More
  • Newer
    Older
    Sign up and start building
    Not ready yet? Talk to an expert.