Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RingCentral Support Added #878

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

RingCentral Support Added #878

wants to merge 4 commits into from

Conversation

caronc
Copy link
Owner

@caronc caronc commented May 22, 2023

Description:

Related issue (if applicable): #796

Added RingCentral Support

  • Source: https://ringcentral.com
  • Icon Support: No
  • Attachment Support: No
  • Message Format: Text
  • Message Limit: 160 Characters per message

You need to have an account with RingCentral and create an App configured to use the JWT auth flow.

  • At a bare minimum, you must grant it the SMS Application Scope

One you've completely set up your Application, you will need to then access the credentials portion of your account and generate a JWT Token that you can share with Apprise (allowing you to authenticate).

Syntax

Valid syntax is as follows:

  • ringc://{from_phone}:{token}@{client_id}/{secret}
  • ringc://{from_phone}:{token}@{client_id}/{secret}/{targets}
  • ringc://{from_phone}:{password}@{client_id}/{secret}
  • ringc://{from_phone}:{password}@{client_id}/{secret}/{targets}

Parameter Breakdown

Variable Required Description
client_id Yes This is the Client ID associated with your RingCentral App
secret Yes This is the Client Secret associated with your RingCentral App
from_phone Yes This is the Phone Number associated with your RingCentral App. This acts s your User ID
token Yes This is the JWT Token associated with your RingCentral User Profile. You can generate this in the Credentials section of your RingCentral account.
mode No The authentication mode; Possible values are jwt, and basic. The Apprise Library should be clever enough to figure this out on it's on, but you can manually force it's value if required.
targets No Optionally identify the phone numbers you wish to send your SMS Message to. If one isn't specified, then the phone number associated with your account is used instead.
env No The environment the App details are associated with. If you are testing things out in the Sandbox you must set this to sandbox or dev (an alias to sandbox). Otherwise it assumes it's default value of prod (Production)
ext No The extension to use; by default it sets itself to sms but can additionally bet set to mms

New Service Completion Status

  • apprise/plugins/NotifyRingCentral.py
  • KEYWORDS
    • add new service into this file (alphabetically).
  • README.md
    • add entry for new service to table (as a quick reference)
  • packaging/redhat/python-apprise.spec
    • add new service into the %global common_description

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • No lint errors (use flake8)
  • 100% test coverage

Testing

Anyone can help test this source code as follows:

# Create a virtual environment to work in as follows:
python3 -m venv apprise

# Change into our new directory
cd apprise

# Activate our virtual environment
source bin/activate

# Install the branch
pip install git+https://github.com/caronc/apprise.git@796-ringcentral-support

# Test out the changes with the following command (send's a SMS message to our account)
apprise -t "Test Title" -b "Test Message" \
"ringc://myphone:jwt_token@client_id:client_secret"

# Test out the changes with the following command; sends a text message
# to the 2 phone numbers found after our client_secret
apprise -t "Test Title" -b "Test Message" \
"ringc://myphone:jwt_token@client_id:client_secret/+1555123432/1800123436/...."

@codecov-commenter
Copy link

codecov-commenter commented Jun 3, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (c60e358) 100.00% compared to head (4f62199) 100.00%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##            master      #878    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files          118       119     +1     
  Lines        15651     15885   +234     
  Branches      3200      3242    +42     
==========================================
+ Hits         15651     15885   +234     
Impacted Files Coverage Δ
apprise/plugins/NotifyRingCentral.py 100.00% <100.00%> (ø)
apprise/utils.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@caronc
Copy link
Owner Author

caronc commented Jun 3, 2023

Works from my sandbox account, but i don't have a full account.

You'll need to use ?env=dev to test the the sandbox and it defaults prod if not specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants