Git Product home page Git Product logo

poc-sms's Introduction

Example Send SMS

นี้เป็นอย่างตัวการส่ง SMS ด้วย API

Requirement:

วิธีตั้งค่า

สร้างไฟล์ .env ก่อน

API_KEY=
API_SECRET=

ทำการลง package ก่อน

npm install

Run app

npm run start

Example app listening at http://localhost:3000

วิธีทดสอบ

ส่งข้อความไปยังหมายเลขโทรศัพท์ปลายทาง

curl \
-H 'Content-Type: application/x-www-form-urlencoded' \
-X POST \
--data-urlencode 'phone_number=+668xxxxxxxx' \
--data-urlencode 'message=Hello Thaibulksms api' \
http://localhost:3000/send-sms


# phone_number สามารถส่งได้ทั้งรูปแบบ +668xxxxxxxx หรือ 08xxxxxxxx

# Response { remaining_credit: 9, total_use_credit: 1, credit_type: 'standard', phone_number_list: [ { number: '+668xxxxxxxx', message_id: '19mJUdnjrU28BqeqQP83gC', used_credit: 1 } ], bad_phone_number_list: [] }

poc-sms's People

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.