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
updated to 0.15.0 ringcentral-extensible SendFax now failing
Tags: fax
Dec 29, 2022 at 6:01am   •   3 replies  •  0 likes
Ajay Wadhawan

environment: sandbox, have not tried in prod environment

code:

const cvAttachment : Attachment = { filename : fName ,
content : fs . createReadStream ( fName ) , contentType : " application/pdf " };
let faxRequest : CreateFaxMessageRequest =
{ to : [ { phoneNumber : coverLetterRequest . toFax } ] , faxResolution : " High " ,
coverPageText : " CoverPage Attached " , coverIndex : 0 ,
attachments : [ cvAttachment ] };
const faxResponse : FaxResponse = await rc . restapi () . account ()
. extension () . fax () . post ( faxRequest ) ;


error:

Executed ' Functions.Fax340b ' (Failed, Id =80b76844-bcf2-4665-a39b-dd5fda1b85c9, Duration =17604ms)
System.Private.CoreLib: Exception while executing function: Functions.Fax340b. System.Private.CoreLib: Result: Failure
Exception: source.on is not a function
Stack: TypeError: source.on is not a function
at DelayedStream.create (/Users/ajaywadhawan/dev/coach-infrastructure/AzureFunctions/node_modules/delayed-stream/lib/delayed_stream.js:33:10)
at CombinedStream.append (/Users/ajaywadhawan/dev/coach-infrastructure/AzureFunctions/node_modules/combined-stream/lib/combined_stream.js:45:37)
at FormData.append (/Users/ajaywadhawan/dev/coach-infrastructure/AzureFunctions/node_modules/form-data/lib/form_data.js:75:3)
on Dec 29, 2022 at 9:04am   •  0 likes

What is that RingCentral extensible and where do you get it from?

2 Answers
answered on Jan 19, 2023 at 2:05pm  

Tried using the 1.0.1-alpha.0 library.

Now I am getting an error " HTTP 403 Forbidden" in the POST call now. See below(could not attach as file on my mac)

Text of Error Page:

"Sorry, you have been blocked.You are unable to access platform.devtest.ringcentral.com. Why have I been blocked?This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.What can I do to resolve this?You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID = f78b9eb813bffe873"


ERROR Response:

"status": 403,

"statusText": "Forbidden",

"headers": {

"date": "Wed, 18 Jan 2023 20:00:59 GMT",

"content-type": "text/html; charset=UTF-8",

"transfer-encoding": "chunked",

"connection": "close",

"cache-control": "max-age=15",

"expires": "Wed, 18 Jan 2023 20:01:14 GMT",

"x-frame-options": "SAMEORIGIN",

"vary": "Accept-Encoding",

"server": "cloudflare",

"cf-ray": "78b9eb813bffe873-DFW"

}


Request:

{

"method": "post",

"baseURL": "https://platform.devtest.ringcentral.com",

"url": "/restapi/v1.0/account/~/extension/~/fax",

"data": "<Buffer>",

"headers": {

"Accept": "application/json, text/plain, */*",

"Content-Type": "multipart/form-data; boundary=ad05fc42-a66d-4a94-b807-f1c91136c17b",

"X-User-Agent": "Unknown/0.0.1 ringcentral-extensible/core/1.0.0-alpha",

}
}

STACK line of error :

Stack: Error: HTTP 403 Forbidden

at Rest.request (/Users/ajaywadhawan/dev/coach-infrastructure/AzureFunctions/node_modules/@rc-ex/core/lib/Rest.js:73:15)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

at async RingCentral.request (/Users/ajaywadhawan/dev/coach-infrastructure/AzureFunctions/node_modules/@rc-ex/core/lib/index.js:27:23)

at async Index.post (/Users/ajaywadhawan/dev/coach-infrastructure/AzureFunctions/node_modules/@rc-ex/core/lib/paths/Restapi/Account/Extension/Fax/index.js:25:19).

Executed HTTP request: {

requestId: "389610d8-7ba7-47e3-86f4-b9dd30454cce",

identities: "",

status: "500",

duration: "9003"

}



 0
on Jan 20, 2023 at 10:15am   •  1 likes

I believe this is our sandbox environment cloudflare configuration blocked your request. You may ignore it and test it in production environment.

on Jan 19, 2023 at 2:06pm   •  0 likes

Clean up your post or I have to delete it. It's so messy so how do you expect someone to read and help you with that?

answered on Jan 17, 2023 at 10:18am  

I believe this is a breaking change of node.js. If you downgrade node.js to version 16 or lower, the issue will disappear.

Or you upgrade to @rc-ex/core 1.0.1.alpha.0, which has fixed this issue. We cannot make change to 0.15.0 any more because it is an already published version.


 0
answered on Jan 17, 2023 at 9:17am  

Thanks @Phong Vu for your response. We have been using https://github.com/ringcentral/ringcentral-extensible for the last year or more I was told RC support had suggested we use it. It seems it is buggy. What do you suggest?


 0
on Jan 17, 2023 at 9:30am   •  0 likes

@Tyler Liu Can you check this? Thanks



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