GithubHelp home page GithubHelp logo

ahmed-mohamedd / schedulig-message-using-twilio-and-hangfire Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 28 KB

This repository demonstrates a simple implementation of scheduling messages using Twilio and Hangfire in a .NET application.

C# 100.00%
hangfire-dotnet-core twilio twilio-api twilio-sms

schedulig-message-using-twilio-and-hangfire's Introduction

Scheduling Messages with Twilio and Hangfire

Overview

This repository demonstrates a simple implementation of scheduling messages using Twilio and Hangfire in a .NET application. Twilio is a cloud communications platform that allows developers to send messages programmatically, and Hangfire is a .NET library for background processing.

This project showcases how to leverage Hangfire to schedule the sending of messages through Twilio, enabling you to automate the process of sending messages at specified times.

Prerequisites

Before getting started, make sure you have the following installed:

  • .NET Core SDK
  • Twilio account and credentials (Account SID, Auth Token)
  • Hangfire NuGet package

Getting Started

  1. Clone this repository to your local machine. (git clone (https://github.com/Ahmed-Mohamedd/Schedulig-Message-Using-Twilio-And-Hangfire.git))

  2. Open the solution file (TestSchedulingMessageWithTwilioandHangfire.sln) in Visual Studio. or Navigate to the Project Directory: bash (cd Scheduling Messages with Twilio and Hangfire)

  3. Configure Twilio Credentials: Update the appsettings.json file with your Twilio Account SID and Auth Token.

{ "Twilio": { "AccountSid": "YOUR_TWILIO_ACCOUNT_SID", "AuthToken": "YOUR_TWILIO_AUTH_TOKEN", "FromPhoneNumber": "YOUR_TWILIO_PHONE_NUMBER" } } Replace the values with your own Twilio account SID, auth token, and phone number.

  1. Build and Run: Build and run the application using the following commands: (dotnet build, dotnet run)

  2. Access the Hangfire Dashboard: Open your browser and navigate to http://localhost:/hangfire. Here, you can view and manage scheduled jobs.

Project Structure

  • ApiController.cs: This class contains methods for scheduling messages Which it called by HangfireService.

  • HangFireService.cs: The HangFireService class encapsulates the hangfire-related functionality, such as scheduling Message or Recurring Message.

  • TwilioService.cs: The TwilioService class encapsulates the Twilio-related functionality, such as sending SMS messages or whatsApp message.

  • Program.cs: The entry point of the application where i configure (hangfire & twilio) and allowing Dependency Injection For Both TwilioService & HangFireService.

  • appsettings.json: Configuration file containing Twilio credentials and connection string for hangfire.

Contributing

Feel free to contribute to this project by opening issues or submitting pull requests. Your feedback and improvements are highly appreciated!

Built With

.NET Core Twilio Hangfire

Authors

Ahmed Mohamed

schedulig-message-using-twilio-and-hangfire's People

Contributors

ahmed-mohamedd avatar ayasaad5 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.