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.
- v17
- v18
Configuration config = new Configuration();
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
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:
RbmActionBaseRbmActionDialRbmActionOpenUrlRbmActionViewLocationMultiChannelActionCalendarEventRbmSuggestionResponse
- v17
- v18
var action = new RbmActionDial(
// ...
postbackData: new byte[] { 1, 2, 3 },
// ...
);
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.
| v17 | v18 |
|---|---|
Sending | MessageSending |
Sent | MessageSent |
Delivered | MessageDelivered |
Failed | MessageFailed |
Read | MessageRead |
A new member, SessionStarted (session-started), has also been added.
- v17
- v18
if (callback.Type == StatusCallbackTypeEnum.Delivered)
{
// ...
}
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.
- v17
- v18
var message = new InboundCallbackMessage(
id, owner, applicationId, time, segmentCount, direction, to, from,
text, tag, media, priority, channel,
content, suggestionResponse, locationResponse
);
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.
- v17
- v18
var root = new Root(speakSentence);
var response = new Response(speakSentence);