https://github.com/podium/podium-api-sample-messages
https://github.com/podium/podium-api-sample-messages
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/podium/podium-api-sample-messages
- Owner: podium
- Created: 2022-09-01T21:12:36.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-02-25T20:14:12.000Z (3 months ago)
- Last Synced: 2025-02-25T20:34:48.748Z (3 months ago)
- Language: JavaScript
- Size: 200 KB
- Stars: 0
- Watchers: 13
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Sample Integration: Send Messages
## About the Integration
This repository provides a quick solution that will allow messages (SMS or Email) to be send to end users
to Podium. The integration uses the send a message
You can learn more about the message object by accessing
our API reference docs## Get Started
If it is your first time using Podium API, checkout our Get Started Guide to get your credentials and understand our scope.
## Running Locally
### 1. Get your developer account
In order to make https requests make sure you have a developer account and the following keys:
- ClientId
- ClientSecret
- RefreshToken
### 2. Setup local project
```html
git clone https://github.com/podium/podium-api-demo-contacts.git
cd ~/podium-api-demo-contacts
https://nodejs.org/en/knowledge/HTTP/servers/how-to-create-a-HTTPS-server/
npm install
```
### 3. Set environment variables
```html
REFRESHTOKEN = '' CLIENTID = '' CLIENTSECRET = ''
```
### 4. Run Code
```
node index.js
```
You can use Postman to make requests to the local server. Below is an example of a message body that can be use to send messages.
Note: Make sure you know your locationUid and have a valida phone number.
```json
{
"channel": {
"identifier": "8001119232",
"type": "phone"
},
"body": "Just a reminder that your appointment is today! - Dynamic Body",
"locationUid": "b405e23a-2d8e-5000-909c-d1759dd40000"
}
```