The error calls are still coming from the dev environment. We downloaded the JSON credentials and everything. Client ID: SLHi8WXcQKOpMHRv4XTVww
I have to delete the new post again. The same problem as I wrote earlier.
Please submit a dev support ticket from here
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'
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.
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'
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