404 error in all Nexmo API calls

I am trying to integrate Nexmo in my java application, I have already created websocket where I used ngrok to connect inbound call to my localhost for testing.

When I try to modify call status using API it returns 404 status code, However It works fine on azure instance that resides in US. It looks like the call is received in different data center but my API calls are routed to different data center where there is no information about my call uuid.

I have found this article where it suggests a work around to modify baseurl but not sure how to modify baseurl in Nexmo client library for java.

Note: I have purchased US based phone number from Nexmo, and my current location is Asia.


I'm afraid the Java client library doesn't yet support changing the base URL. There's an open PR for the feature, but it isn't finished yet!

In the meantime, there is a workaround - it's a bit of a pain, but it will work.

The code for the modify call endpoint is in ModifyCallMethod.java. You can subclass this and modify makeRequest to use the correct baseURL. Once this is done, you can create an instance of this and call its execute method with a ModifyCallPayload parameter.

Keep an eye out for the next release of the Nexmo Java client library, which should contain the feature you're looking for.

链接地址: http://www.djcxy.com/p/5664.html

上一篇: 使用voiceBase Api的文本

下一篇: 所有Nexmo API调用中都有404错误