Skip to main content

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:

  1. A Messenger App account from Cashia.
  2. Visual Studio Code (VS Code) installed on your local machine.
  3. 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

  1. Create a Project Folder:

    • On your local machine, create a folder named messenger.
  2. Open the Folder in VS Code:

    • Open the messenger folder using VS Code.
    • Create a new file named messages.http.
    • Create another file named .env in the same folder.
  3. Install Rest Client Extension:

    • Navigate to the Extensions section in VS Code.
    • Search for and install the Rest Client extension.

5. Configure the Project

  1. Copy Raw Code:

    • Navigate to the Documentation section on the Messenger App here.
    • Copy the raw code from the documentation.
  2. Paste the Code:

    • Go back to the messages.http file in VS Code.
    • Paste the copied raw code into the file.
  3. 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).
  4. Configure .env File:

    • Open the .env file 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_here with your generated API key.

6. Sending a Request

  1. Modify Profile Settings:

    • Go to messanger app and click on your profile and select Settings.
    • Navigate to the Bulk SMS section in the settings:
    • Change the Sender Name to Cashia.
    • Change Bulk SMS Package ID to 9487.
    • Input your password to save these changes.
  2. Navigate to messages.http File:

    • Open the messages.http file in VS Code.
  3. Send a Request:

    • Locate the first variable, which is Get all messages.
    • Right-click and select Send Request to get all messages.
  4. Retrieve and Use the Message ID:

    • In the generated response, there should be a MESSAGE_ID.
    • Copy the MESSAGE_ID and paste it into your .env file.

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.http and 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!