Hi there,
I'm using RingCentral SDK 2.4 to test the API to send High Volume SMS (HV SMS). My application has been approved and active on PROD environment.
I'm using the sample code as bellow:
CreateSMSMessageBatchRequest parameters = new CreateSMSMessageBatchRequest(); parameters.from = "+14082223XXX"; parameters.text = "Hello Team, This is MOSO called High Volume APIs"; String[] numbers = new String[] {"+14243325470", "+14243325455"}; parameters.messages = new MessageCreateRequest[numbers.length]; for (int i=0; i<numbers.length; i++) { MessageCreateRequest m = new MessageCreateRequest(); m.to = new String[] {numbers[i]}; parameters.messages[i] = m; } for (int i = 0; i < 2 ; i++ ) { MessageBatchInfo post = restClient.restapi().account().a2pSms().batches().post(parameters); System.out.println(post.from + " - " + post.id + " - " + post.creationTime + " - " + post.status + " - " + post.batchSize + " - " + post.processedCount); }
But i alway got this (404) error message:
status code: 400 Server: nginx Date: Wed, 04 Jan 2023 10:18:32 GMT Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive RCRequestId: 23862f92-8c19-11ed-b66f-0050568ccada X-Rate-Limit-Group: light X-Rate-Limit-Limit: 50 X-Rate-Limit-Remaining: 49 X-Rate-Limit-Window: 60 RoutingKey: SJC01P17 {"errorCode":"CMN-101","message":"Parameter [from] value is invalid.","errors":[{"errorCode":"CMN-101","message":"Parameter [from] value is invalid."}]} HTTP Request ============ HTTP POST https://platform.ringcentral.com/restapi/v1.0/account/~/a2p-sms/batches Authorization: Bearer U0pDMDFQMTdQQVMwMHxBQURuU2lET2JsYTNhMDg2ejVLTmRfYl9jMS04ZjVQU3U5STR0THgwQTBQdlRZZ2hMTHhtRTREZF9idXktaElDQmI1ZkpmaFNfZnlUTENnUXBCSkdJMjZqYllibF9xdGJYZElybENlRjl6UlY5cmlsa2UtdnptTVhVwewewewewe4NmRZNm5FTHVuVXVsLUNWQlNvbFE3dVJJQ1VGRElDWkdzemhNWlRZZ0szTU1yZzRHY2VkNE9JN3hpS2lCaEo3OHgyaDNjZGpkSGlZRXxrMDZkNEF8bzVEN0hRZVF2aVg5NzBSSmFocWdxd3xBUXxBQXxBQUFBQU5FSC1hbw X-User-Agent: RC-JAVA-SDK Java 1.8.0_221 Mac OS X
I'm pretty sure that the from number already correct.
I tried this website and my account work perfectly with this APIs:
https://www.sms-campaigns.com/standard