Skip to main content
Solved

404 from python SDK

  • February 16, 2023
  • 3 replies
  • 461 views

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?

Best answer by ByrneReese

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.

3 replies

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • February 16, 2023

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.


ByrneReese
Community Manager
Forum|alt.badge.img+3
  • Product Manager
  • Answer
  • February 16, 2023
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.

  • Author
  • New Participant
  • February 16, 2023

@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.