Getting Started
Introduction
This README document outlines the setup and integration steps for using the Messenger App. Follow the instructions carefully to ensure successful configuration and usage.
Prerequisites
Before you start, ensure you have the following:
- A Messenger App account from Cashia.
- Visual Studio Code (VS Code) installed on your local machine.
- Rest Client extension installed in VS Code.
Step-by-Step Setup
1. Request a Messenger App Account
-
Contact Cashia to request a notification Messenger App account.
-
You will receive two emails from Cashia:
- Manual Email: Contains your login credentials (email and password) and a link to the Messenger App.
- Automatic Email: Requests you to confirm your email address.
2. Log In to the Messenger App
-
Use the credentials provided in the manual email to log in to the Messenger App.
-
Once logged in, you will be directed to the Messenger Dashboard.
3. Confirm Your Email Address
- Open the automatic email and follow the instructions to confirm your email address.
4. Set Up Your Local Environment
-
Create a Project Folder:
- On your local machine, create a folder named
messenger.
- On your local machine, create a folder named
-
Open the Folder in VS Code:
- Open the
messengerfolder using VS Code. - Create a new file named
messages.http. - Create another file named
.envin the same folder.
- Open the
-
Install Rest Client Extension:
- Navigate to the Extensions section in VS Code.
- Search for and install the Rest Client extension.
5. Configure the Project
-
Copy Raw Code:
- Navigate to the Documentation section on the Messenger App here.
- Copy the raw code from the documentation.
-
Paste the Code:
- Go back to the
messages.httpfile in VS Code. - Paste the copied raw code into the file.
- Go back to the
-
Generate an API Key:
- Navigate to the API section on the Messenger App.
- Click on the option to generate an API key.
- Copy the API key and take a screenshot (Note: Once the API key is generated, it cannot be viewed again).
-
Configure
.envFile:-
Open the
.envfile in VS Code. -
Add the following configuration:
API_KEY=your_api_key_here
BASE_URL=https://messenger.stg.cashia.com/api
Replace
your_api_key_herewith your generated API key. -
6. Sending a Request
-
Modify Profile Settings:
- Go to messanger app and click on your
profileand selectSettings. - Navigate to the Bulk SMS section in the settings:
- Change the Sender Name to
Cashia. - Change Bulk SMS Package ID to
9487. - Input your
passwordto save these changes.
- Go to messanger app and click on your
-
Navigate to
messages.httpFile:- Open the
messages.httpfile in VS Code.
- Open the
-
Send a Request:
- Locate the first variable, which is
Get all messages. - Right-click and select Send Request to get all messages.
- Locate the first variable, which is
-
Retrieve and Use the Message ID:
- In the generated response, there should be a
MESSAGE_ID. - Copy the
MESSAGE_IDand paste it into your.envfile.
- In the generated response, there should be a
7. Final .env File
Your .env file should look like this:
API_KEY=3ead9a44-60ec-4a0b-8352-f6627090f5b8
BASE_URL=https://messenger.stg.cashia.com/api
MESSAGE_ID=3ead9a44-60ec-4a0b-8352-f6627090f5b8
8. Testing and Validation
- Go back to
messages.httpand right-click on other variables (e.g.,Get a single message by its ID,Send an SMS notification,Send an Email notification) to interact with the API using the Rest Client.
Conclusion
You have successfully set up the Messenger App and configured the API. You can now use the Rest Client in VS Code to interact with the Messenger App API. For additional support or queries, refer to the documentation or reach out to the Cashia support team.
Happy Testing!