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
404 from python SDK
Tags: rest api, sdk, developer sandbox
Feb 15, 2023 at 4:01pm   •   2 replies  •  0 likes
VBS Development

I'm getting 404 errors from the sample code for the python SDK.

The sample code is located here:

https://developers.ringcentral.com/guide/team-messaging/quick-start#python

The error I am receiving:

  File "python3.9/site-packages/ringcentral/http/client.py", line 28, in send
    response.response().raise_for_status()
  File "python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://platform.devtest.ringcentral.com/restapi/v1.0/team-messaging/v1/teams

This call works fine from the api reference page. I have noticed that the SDK is adding restapi/v1.0/ to the URL. The api reference page uses this URL:

https://platform.devtest.ringcentral.com/team-messaging/v1/teams

Is this the cause of the error?

2 Answers
answered on Feb 16, 2023 at 8:33am  

That is the new endpoint and we have not updated the Python SDK to handle new endpoint structure.

You can specify the entire domain and path like this

try
    endpoint = "https://platform.devtest.ringcentral.com/team-messaging/v1/teams"
    params = {
        'public': True,
        'name': "Test team",
        'members': [{ "email": "member.one@gmail.com"}, {"email":"member.two@gmail.com"}],
        'description': "This is my team"
    }
    resp = platform.post(endpoint, params)
    print(resp.text())
except Exception as e:
    print (e)

We will update the SDK soon to support new endpoints.


 1
answered on Feb 16, 2023 at 8:47am  

We just updated the Python SDK to version 0.7.17 to fix this issue. It would be great if someone could update their apps to use the newer version and validate that the fix addresses the issue successfully.


 1
on Feb 16, 2023 at 9:20am   •  0 likes

@Byrne Reese I just updated the python package (pip install --upgrade ringcentral) and can confirm the fix is working. Thank you so much for the quick turnaround on this, much appreciated.



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