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
Why do I get an 404 error when fetching profile-images?
Tags: presence, rest api
May 2, 2022 at 3:13pm   •   2 replies  •  0 likes
Alex Rogers

I'm using the .Net API. Using Fiddler I can see the requests clearly. My notes

I fetch an extension's details: C#:
ext = await r.RestClient.Restapi().Account().Extension(id).Get()

Fiddler:
https://platform.ringcentral.com/restapi/v1.0/account/~/extension/803791067

The result includes a profileImage, ie: uri=https://platform.ringcentral.com/restapi/v1.0/account/574962067/extension/803791067/profile-image

But when I request the image then we get a failure: C#: picBytes = await r.RestClient.Restapi().Account().Extension(id).ProfileImage().Get();

Fiddler: https://platform.ringcentral.com/restapi/v1.0/account/574962067/extension/803791067/profile-image

But it returns a "404" error:

HTTP/1.1 404 Not Found

{ "errorCode" : "CMN-102", "message" : "Resource for parameter [extensionId] is not found", "errors" : [ { "errorCode" : "CMN-102", "message" : "Resource for parameter [extensionId] is not found", "parameterName" : "extensionId" } ], "parameterName" : "extensionId" }

Surely this isn't right, is it? Because of these "404" results then it prevents my application from "graduating". Am I doing something wrong?

2 Answers
answered on May 3, 2022 at 10:43am  

Hi @Phong Vu

Thanks again. I have added the new traces below.

I'm not really sure about your second comment. Could this be why the problem is now happening? The same code used to work when it was written.

I created and registered the app using the first (trial) account. But then as you say, I have got a new, different production account. I thought I would carry on using the first account as just like a "developer" account, that I only accessed to edit/publish the app. And I'd use my new account for real calls, etc. Is that now how it works? Should I move/recreate the app under my new account?

Regards Alex

== Traces:

 GET https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~ HTTP/1.1
 X-User-Agent: Unknown/0.0.1 RingCentral.Net/5.2.0
 Authorization: Bearer [redacted]
 Host: platform.ringcentral.com
 --
 HTTP/1.1 200 OK
 Server: nginx
 Date: Tue, 03 May 2022 17:37:01 GMT
 Content-Type: application/json;charset=utf-8
 Content-Length: 6601
 Connection: keep-alive
 RCRequestId: a3ce4e7e-cb07-11ec-b618-005056b5c469
 RoutingKey: ZRH01P32PAS03
 Content-Language: en-GB
 Vary: Accept-Encoding, User-Agent
 X-Rate-Limit-Group: light
 X-Rate-Limit-Limit: 50
 X-Rate-Limit-Remaining: 48
 X-Rate-Limit-Window: 60
    
 {
   "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/574962067/extension/1005430067",
   "id" : 1005430067,
   "extensionNumber" : "323",
   [REDACTED]
   "profileImage" : {
     "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/574962067/extension/1005430067/profile-image"
   },
   "account" : {
     "uri" : "https://platform.ringcentral.com/restapi/v1.0/account/574962067",
     "id" : "574962067"
   },
   "hidden" : false
 }
 ==
 GET https://platform.ringcentral.com/restapi/v1.0/account/~/extension/~/profile-image HTTP/1.1
 X-User-Agent: Unknown/0.0.1 RingCentral.Net/5.2.0
 Authorization: Bearer [Redacted]
 Host: platform.ringcentral.com
 -
 HTTP/1.1 404 Not Found
 Server: nginx
 Date: Tue, 03 May 2022 17:37:01 GMT
 Content-Type: application/json;charset=utf-8
 Content-Length: 289
 Connection: keep-alive
 RCRequestId: a3d88574-cb07-11ec-b618-005056b5c469
 RoutingKey: ZRH01P32PAS03
 Content-Language: en-GB
 X-Rate-Limit-Group: medium
 X-Rate-Limit-Limit: 40
 X-Rate-Limit-Remaining: 38
 X-Rate-Limit-Window: 60
    
 {
   "errorCode" : "CMN-102",
   "message" : "Resource for parameter [extensionId] is not found",
   "errors" : [ {
     "errorCode" : "CMN-102",
     "message" : "Resource for parameter [extensionId] is not found",
     "parameterName" : "extensionId"
   } ],
   "parameterName" : "extensionId"
 }
 ==
 GET https://platform.ringcentral.com/restapi/v1.0/account/574962067/extension/1005430067/profile-image HTTP/1.1
 X-User-Agent: Unknown/0.0.1 RingCentral.Net/5.2.0
 Authorization: Bearer [Redacted]
 Host: platform.ringcentral.com
 -
 HTTP/1.1 404 Not Found
 Server: nginx
 Date: Tue, 03 May 2022 17:40:09 GMT
 Content-Type: application/json;charset=utf-8
 Content-Length: 289
 Connection: keep-alive
 RCRequestId: 1399ae6a-cb08-11ec-b905-005056b58c8b
 RoutingKey: ZRH01P32PAS01
 Content-Language: en-GB
 X-Rate-Limit-Group: medium
 X-Rate-Limit-Limit: 40
 X-Rate-Limit-Remaining: 37
 X-Rate-Limit-Window: 60
    
 {
   "errorCode" : "CMN-102",
   "message" : "Resource for parameter [extensionId] is not found",
   "errors" : [ {
     "errorCode" : "CMN-102",
     "message" : "Resource for parameter [extensionId] is not found",
     "parameterName" : "extensionId"
   } ],
   "parameterName" : "extensionId"
 }

 0
answered on May 3, 2022 at 7:24am  

You wrote the "404" results prevents your application from "graduating" but the API url you posted is the url for production environment (https://platform.ringcentral.com/restapi/v1.0/account/~/extension/803791067)

Using the .Net SDK on sandbox environment, you need to set the correct platform when creating the SDK instance. I.e 'https://platform.devtest.ringcentral.com'


 0
on May 3, 2022 at 8:21am   •  0 likes

@Phong Vu Thanks. Yes, you can disregard my comments about "graduating". Because I was getting the "404" errors, it did (past tense) stop us graduating. So I remove the "fetching images" bit from our code. As a result the application then passed (graduated) and hence I then went on to documente the problem on the production environment.

The problem is still happening. I can't seem to get the images using the SDK, on the Sandbox or on Production. Does "404" signify that the user supposedly has no picture? If so, it's a shame that it returns an error ("404") and not something nicer, like a "204 No Content".

on May 3, 2022 at 8:33am   •  0 likes

So your application is already graduated? What is the app client id?

Also, the error message in the result is not about the profile image was not found. It says "Resource for parameter [extensionId] is not found". So it seems the provided "extension id" is invalid.



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