Twilio Test Credentials: WaitingForActivation when I try to buy a number?

I have the following code:

    public void PurchaseNumber(string username, string phoneNumber) {

        var twilio = new TwilioRestClient(accountSid, authToken);

        var options = new PhoneNumberOptions {
            VoiceUrl = "",
            PhoneNumber = "+15005550006"
        };
        var number = twilio.AddIncomingPhoneNumber(options);

        Console.WriteLine(number.Id); // Sid is not available

        return;
    }

Two problems are number.Sidunavailable because the samples are displayed, but number.Statusalways shows "WaitingForActivation". What am I doing wrong?

Update. This also happens with the number "unavailable", and not just with the "valid and available". Is using magic numbers available for trial accounts? I use the SID and token from the page https://www.twilio.com/user/account/developer-tools/test-credentials.

This also happens if I change one of the characters of my SID - so it seems that my SID is invalid, even though it takes it directly from my page /developer-tools.

- , PreRelease Twilio nuget. , Sid , .

enter image description here

+1
1

- , PreRelease Twilio nuget. , , .

0

All Articles