Skip to main content

v17 -> v18

HTTP Basic Authentication Removed​

HTTP Basic authentication is no longer supported. OAuth2 client credentials are now the only supported authentication method for every API class.

Username and Password on Configuration and IReadableConfiguration are now obsolete, and any code that reads or sets them will fail to compile:

error CS0619: 'Configuration.Username' is obsolete: 'HTTP Basic authentication is no longer supported. Use OAuthClientId and OAuthClientSecret instead.'

Replace your username and password with an OAuth2 client ID and secret. See Credentials Management for how to obtain them.

Configuration config = new Configuration();
config.OAuthClientId = "YOUR_CLIENT_ID";
config.OAuthClientSecret = "YOUR_CLIENT_SECRET";

Postback Data Type Change​

PostbackData has been changed from a byte[] to a string. This affects the property and constructor parameter on the following models:

  • RbmActionBase
  • RbmActionDial
  • RbmActionOpenUrl
  • RbmActionViewLocation
  • MultiChannelActionCalendarEvent
  • RbmSuggestionResponse
var action = new RbmActionDial(
// ...
postbackData: "postbackData",
// ...
);

Status Callback Type Enum Members Renamed​

The members of StatusCallbackTypeEnum have been renamed. The underlying JSON values are unchanged.

v17v18
SendingMessageSending
SentMessageSent
DeliveredMessageDelivered
FailedMessageFailed
ReadMessageRead

A new member, SessionStarted (session-started), has also been added.

if (callback.Type == StatusCallbackTypeEnum.MessageDelivered)
{
// ...
}

Inbound Callback Message Constructor Parameter Order​

A new session parameter has been added to the InboundCallbackMessage constructor, directly before content. Code that passes content, suggestionResponse, or locationResponse positionally must be updated. Named arguments are unaffected.

var message = new InboundCallbackMessage(
id, owner, applicationId, time, segmentCount, direction, to, from,
text, tag, media, priority, channel,
session, content, suggestionResponse, locationResponse
);

BXML Root Is Now Abstract​

Bandwidth.Standard.Model.Bxml.Root is now an abstract base class and can no longer be instantiated or subclassed directly. Use BXML or Response instead.

var response = new Response(speakSentence);