Legacy Dev Forum Posts

 View Only

Sign Up

404 page not found when using API

  • 1.  404 page not found when using API

    Posted 06-05-2025 18:08

    Jessy | 2022-12-19 15:47:47 UTC | #1

    Hi, I putting in place a way to monitor trunks data. The portion of Oauth is fine, but when I'm trying to start an api instance, I have an error HTTP response body: 404 page not found

    I am using the sample code from the SDK Documentation, here's the portion of the code:

    Configure OAuth2 access token for authorization: PureCloud OAuth

    PureCloudPlatformClientV2.configuration.host = 'https://login.cac1.pure.cloud'

    apiclient = PureCloudPlatformClientV2.apiclient.ApiClient().getclientcredentialstoken(CLIENTID, CLIENTSECRET)

    authApi = PureCloudPlatformClientV2.AuthorizationApi(apiclient)

    PureCloudPlatformClientV2.configuration.accesstoken = apitoken

    or use getclientcredentialstoken(...), getsaml2bearertoken(...) or getcodeauthorizationtoken(...)

    create an instance of the API class

    api_instance = PureCloudPlatformClientV2.TelephonyProvidersEdgeApi()

    edge_id = 'fd621e4b-9347-4aab-b6b9-ceba4c72d9f2' # str | Edge ID

    expand = ['id'] # list[str] | Fields to expand in the response, comma-separated (optional)

    try:

    Get edge.

    apiresponse = apiinstance.gettelephonyprovidersedge(edgeid)

    pprint(api_response)

    except ApiException as e:

    print("Exception when calling TelephonyProvidersEdgeApi->gettelephonyproviders_edge: %s\n" % e)

    Here's the return message:

    Exception when calling TelephonyProvidersEdgeApi->gettelephonyproviders_edge: (404) Reason: Not Found HTTP response body: 404 page not found

    Can someone help me with that or guide me?

    Thanks


    John_Carnell | 2022-12-20 13:52:50 UTC | #2

    Hi Jessy,

    Are these edges that are residing in your data center or are these AWS Edges running as part of a GCV installation?

    Thanks, John Carnell Manager, Developer Engagement


    Jessy | 2022-12-20 14:18:41 UTC | #3

    It is part of a GCV installation, nothing on-prem.


    John_Carnell | 2022-12-20 14:26:48 UTC | #4

    Hi Jessy,

    I need to double check but you might not be able to see the actual trunk configuration for the edge because it is completely managed by Genesys. For GCV-created resources (e.g. the edges, trunks) we have internal permission that restricts what you can see.

    I am going to pass this post off to the edge team for more clarification.

    Thanks, John Carnell Manager, Developer Engagement


    Jessy | 2022-12-20 14:28:11 UTC | #5

    The portion of looking at the edges was example, I have the same problem, with trunks metrics, and list all available users.


    John_Carnell | 2022-12-20 14:31:09 UTC | #6

    Hi Jessy,

    Ahhh. Are you using divisions at all? If you are, you might want to check that the OAuth client you are using has a role that belongs to the division.

    Thanks, John


    Jessy | 2022-12-21 11:58:46 UTC | #7

    Yes I am, even did Master Admin as a test. Also tried get_user on my own ID, still a 404 error code return.


    John_Carnell | 2023-01-03 15:50:53 UTC | #8

    Hi Jessy,

    We are restrictive of what you can do with the telephony APIs when you are trying to do any actions against a GCV edge. The thing that is unusual is that you are also having problems retrieving a list of users. I would double-check the permissions associated with each of the APIs that you are trying to retrieve (there are different permissions for many APIs) and ensure that they are assigned to your OAuth client role.

    If that does not work, I would open a ticket with our customer Care team.

    We do not have the ability to diagnose issues like this via the forum.

    Thanks, John Carnell Manager, Developer Engagmeent


    John_Carnell | 2023-01-03 15:50:57 UTC | #9


    This post was migrated from the old Developer Forum.

    ref: 17695