can anyone tell me how to resolve this problem. Java code is like below.
@Service
public class TwilioServiceProvider {
private static final String ACCOUNT_SID =
"ACbfadc94adf90fd6606222566aab3ef4";
private static final String AUTH_TOKEN = "f***********************";
public void sendMessage(String mobileNo){
Twilio.init(ACCOUNT_SID,AUTH_TOKEN);
Message message = Message.creator(new PhoneNumber(mobileNo),new
PhoneNumber("+18325323857"),"Account validation
successfull").create();
System.out.println(message.getAccountSid());
}
}
I get the following error:
com.twilio.exception.ApiException:
The requested resource /2010-04-01/Accounts/ACbfadc94adf90fd6606222566aab3ef4/Messages.json was not found
Twilio developer evangelist here.
If that is your real Account Sid in the code sample then that is where your problem lies. I just checked in our system and that Account Sid doesn't exist.
I'd double check your Account Sid in the Twilio console and try again, the code looks good otherwise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With