News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
App graduated from sandbox to production, but when doing API calls, it is still pulling from dev.
Tags: rest api
Mar 23, 2023 at 7:52am   •   4 replies  •  0 likes
Raj Sharma

The error calls are still coming from the dev environment. We downloaded the JSON credentials and everything. Client ID: SLHi8WXcQKOpMHRv4XTVww

4 Answers
answered on Mar 27, 2023 at 9:31am  

I have to delete the new post again. The same problem as I wrote earlier.

Please submit a dev support ticket from here


 0
answered on Mar 24, 2023 at 8:09am  

App ID: riEXZnJHSe6P_haqc3GsXg~DqXw2ZKMTJyE7du8IpApaA App Name: Analytics Quick Start App App Type: Private App Link: https://ai-developer.ringcentral.com/administration.html#/application/riEXZnJHSe6P_haqc3GsXg~DqXw2ZKMTJyE7du8IpApaA Env: Production Topic: Authentication and authorization Details: Hi Team, We are facing error in trying to connect to production server. Despite changing the credentials to that of production from the development, the calls are still going to the sandbox server instead of production. I am including the .env file and python code below being used for the same. Let us know if you can help with the same. Python Code from ringcentral import SDK import os,sys,json from dotenv import load_dotenv load_dotenv() FROM_DATE = '2023-03-01T07:00:00.000Z' TO_DATE = '2023-03-20T07:00:00.000Z' rcsdk = SDK( os.environ.get('RC_CLIENT_ID'), os.environ.get('RC_CLIENT_SECRET'), os.environ.get('RC_SERVER_URL') ) platform = rcsdk.platform() try: # print(os.environ.get('RC_SERVER_URL') ) platform.login(os.environ.get('RC_USERNAME'), os.environ.get('RC_EXTENSION'), os.environ.get('RC_PASSWORD')) except: sys.exit("Unable to authenticate to platform. Check credentials.") def fetch_aggregate_report( from_time, to_time ): try: options = { "grouping":{ "groupBy":"Users" }, "timeSettings":{ "timeZone": "US/Pacific", "timeRange":{ "timeFrom": from_time, "timeTo": to_time } }, "responseOptions":{ "counters":{ "allCalls":{ "aggregationType":"Sum" } } } } resp = platform.post('/analytics/calls/v1/accounts/~/aggregation/fetch', options) jsonObj = resp.json_dict() except Exception as err: sys.exit("Unable to fetch analytics", err) print(json.dumps(jsonObj, indent=2, sort_keys=True)) fetch_aggregate_report( FROM_DATE, TO_DATE ) .env file # Create an app in the RingCentral Developer Console. Make sure the app has all permissions enabled. # Enter in the credentials for this app into the fields below. # Sandbox # RC_SERVER_URL = 'https://platform.devtest.ringcentral.com' # Production RC_SERVER_URL = 'https://platform.ringcentral.com' RC_CLIENT_ID = 'SLHi8WXcQKOpMHRv4XTVww' RC_CLIENT_SECRET = 'scHsiRIkQfWyyveLKTe6gAcNizBtlxRKmlzkw9fgLEaw' # These credentials are used for password-grant types RC_USERNAME = '+16103745111' RC_PASSWORD = <Account Password> RC_EXTENSION = '789' # This credential is used for JWT-grant types RC_JWT = '' # Used in messaging/quick-start.py # This following phone number will receive a test SMS message SMS_RECIPIENT = '' # Used in voice/quick-start.py # This following phone number will receive a phone call RINGOUT_RECIPIENT = '' # Used in PubNub Quick Start # The following URL cannot be blank when running the PubNub Quick Start. # Its value will have no impact on automated test results. RC_REDIRECT_URL = 'http://localhost:5000/oauth2callback' # Used in voice/call-forwarding.py # The following phone number will be set as a forwarding number. RC_FORWARDING_NUMBER = '' # Used throughout ai/* (Artificial Intelligence API) # The following phone number will be set as a forwarding number. RC_MEDIA_URL = 'https://github.com/ringcentral/ringcentral-api-docs/blob/conv-ai-docs/resources/sample1.wav?raw=true'


 0
answered on Mar 24, 2023 at 7:31am  

We did all that. Case: 17947263 details the error.


 0
on Mar 24, 2023 at 7:40am   •  0 likes

What is the error. I don't have access to support cases.

answered on Mar 24, 2023 at 7:28am  

Make sure to change the app client id, app client secret for the production in your code. And login with the credentials of one of the users under your production account.


 0
answered on Mar 24, 2023 at 9:01am  

Unfortunately, I have to delete your last post for the following reasons:

1. The content is not formatted in a way that it could be easily read. No lines, no paragraphs.

2. The post contains your app sensitive info such as both app client id, client secret and phone number.

3. Redundant info such as the JWT which is not the grant-type of the concern app.

I also asked for the error and see no error in the post.


 0
answered on Mar 27, 2023 at 9:27am  

App ID: riEXZnJHSe6P_haqc3GsXg~DqXw2ZKMTJyE7du8IpApaA App Name: Analytics Quick Start App App Type: Private App Link: https://ai-developer.ringcentral.com/administration.html#/application/riEXZnJHSe6P_haqc3GsXg~DqXw2ZKMTJyE7du8IpApaA Env: Production Topic: Authentication and authorization Details: Hi Team, We are facing error in trying to connect to production server. Despite changing the credentials to that of production from the development, the calls are still going to the sandbox server instead of production. I am including the .env file and python code below being used for the same. Let us know if you can help with the same. Python Code from ringcentral import SDK import os,sys,json from dotenv import load_dotenv load_dotenv() FROM_DATE = '2023-03-01T07:00:00.000Z' TO_DATE = '2023-03-20T07:00:00.000Z' rcsdk = SDK( os.environ.get('RC_CLIENT_ID'), os.environ.get('RC_CLIENT_SECRET'), os.environ.get('RC_SERVER_URL') ) platform = rcsdk.platform() try: # print(os.environ.get('RC_SERVER_URL') ) platform.login(os.environ.get('RC_USERNAME'), os.environ.get('RC_EXTENSION'), os.environ.get('RC_PASSWORD')) except: sys.exit("Unable to authenticate to platform. Check credentials.") def fetch_aggregate_report( from_time, to_time ): try: options = { "grouping":{ "groupBy":"Users" }, "timeSettings":{ "timeZone": "US/Pacific", "timeRange":{ "timeFrom": from_time, "timeTo": to_time } }, "responseOptions":{ "counters":{ "allCalls":{ "aggregationType":"Sum" } } } } resp = platform.post('/analytics/calls/v1/accounts/~/aggregation/fetch', options) jsonObj = resp.json_dict() except Exception as err: sys.exit("Unable to fetch analytics", err) print(json.dumps(jsonObj, indent=2, sort_keys=True)) fetch_aggregate_report( FROM_DATE, TO_DATE ) .env file # Create an app in the RingCentral Developer Console. Make sure the app has all permissions enabled. # Enter in the credentials for this app into the fields below. # Sandbox # RC_SERVER_URL = 'https://platform.devtest.ringcentral.com' # Production RC_SERVER_URL = 'https://platform.ringcentral.com' RC_CLIENT_ID = 'SLHi8WXcQKOpMHRv4XTVww' RC_CLIENT_SECRET = 'scHsiRIkQfWyyveLKTe6gAcNizBtlxRKmlzkw9fgLEaw' # These credentials are used for password-grant types RC_USERNAME = '+16103745111' RC_PASSWORD = <Account Password> RC_EXTENSION = '789' # This credential is used for JWT-grant types RC_JWT = '' # Used in messaging/quick-start.py # This following phone number will receive a test SMS message SMS_RECIPIENT = '' # Used in voice/quick-start.py # This following phone number will receive a phone call RINGOUT_RECIPIENT = '' # Used in PubNub Quick Start # The following URL cannot be blank when running the PubNub Quick Start. # Its value will have no impact on automated test results. RC_REDIRECT_URL = 'http://localhost:5000/oauth2callback' # Used in voice/call-forwarding.py # The following phone number will be set as a forwarding number. RC_FORWARDING_NUMBER = '' # Used throughout ai/* (Artificial Intelligence API) # The following phone number will be set as a forwarding number. RC_MEDIA_URL = 'https://github.com/ringcentral/ringcentral-api-docs/blob/conv-ai-docs/resources/sample1.wav?raw=true'


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us