You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⚠️ **IMPORTANT NOTE:** This release contains breaking changes.
13
+
All changes, including breaking changes, are addressed and explained in the list below.
14
+
If you find out that something was not addressed properly, please submit an issue.
15
+
16
+
### Added
17
+
- Most recent [Infobip SMS API](https://www.infobip.com/docs/api/channels/sms) feature set.
18
+
- Most recent [Infobip Email API](https://www.infobip.com/docs/api/channels/email) feature set.
19
+
- Most recent [Infobip 2FA API](https://www.infobip.com/docs/api/platform/2fa) feature set.
20
+
-[FileParameter](https://github.com/infobip/infobip-api-csharp-client/blob/master/src/Infobip.Api.Client/Client/FileParameter.cs) class that represents a File passed to the API as a Parameter, allows using different backends for files.
21
+
- Added dependency JsonSubTypes 2.0.1
22
+
23
+
### Changed
24
+
- Some products contain a few breaking changes as some API endpoints have changed since last major release. If you have issues when migrating the existing implementation, please check the official API documentation or submit an issue.
25
+
-`SendSmsApi`, `ScheduledSmsApi` and `ReceiveSmsApi` classes have been unified into [SmsApi](https://github.com/infobip/infobip-api-csharp-client/blob/master/src/Infobip.Api.Client/Api/SmsApi.cs) class.
26
+
-`SendEmailApi`, `ScheduledEmailApi` and `EmailValidationApi` classes have been unified into [EmailApi](https://github.com/infobip/infobip-api-csharp-client/blob/master/src/Infobip.Api.Client/Api/EmailApi.cs) class.
27
+
-`EmailStatus` and `SmsStatus` have been unified into [MessageStatus](https://github.com/infobip/infobip-api-csharp-client/blob/master/src/Infobip.Api.Client/Model/MessageStatus.cs) class.
28
+
-`EmailPrice` and `SmsPrice` have been unified into [MessagePrice](https://github.com/infobip/infobip-api-csharp-client/blob/master/src/Infobip.Api.Client/Model/MessagePrice.cs) class.
29
+
-`EmailReportError` and `SmsError` have been unified into [MessageError](https://github.com/infobip/infobip-api-csharp-client/blob/master/src/Infobip.Api.Client/Model/MessageError.cs) class.
30
+
- API key authentication enforced
31
+
- DeserializeAsync method in [ApiClient](https://github.com/infobip/infobip-api-csharp-client/blob/master/src/Infobip.Api.Client/Client/ApiClient.cs) class is no longer publicly accessible
32
+
- Newtonsoft.Json updated to version 13.0.3
33
+
34
+
### Removed
35
+
-[Basic](https://www.infobip.com/docs/essentials/api-essentials/api-authentication#basic), [IBSSO Token Header](https://www.infobip.com/docs/essentials/api-essentials/api-authentication#ibsso-token-header) and client credentials grant type [OAuth2](https://www.infobip.com/docs/essentials/api-essentials/api-authentication#oauth-20) authentication methods. Use [API Key Header](https://www.infobip.com/docs/essentials/api-essentials/api-authentication#api-key-header) authentication method instead. Example of its usage can be found in the [README](https://github.com/infobip/infobip-api-csharp-client/blob/master/README.md#Quickstart).
36
+
-`GlobalConfiguration` utility class. Having static default configuration is error-prone and provides an unnecessary overhead. An ApiClient instance should always be injected in the given API class.
Thanks for your interest in the project, we'd love to have you involved! Check out the sections below to find out more about what to do next...
3
+
Thanks for your interest in the project, we'd love to have you involved! Check out sections below to find out more about what to do next...
4
4
5
5
## Submitting an Issue
6
6
7
-
If you've seen something that is or might seem like a bug or a mistake in the documentation, or you simply have a suggestion for a new feature, please go ahead and open us[an issue][issue-link].
7
+
If you've seen something that is or may seem like a bug or a mistake in documentation, or you simply have a suggestion for a new feature, please go ahead and open [an issue][issue-link].
8
8
Include as much information as you have.
9
9
10
-
Before you submit your issue please do the archive search first, maybe the same question was already answered or is pending.
10
+
Before you submit your issue, please do the archive search first, as there may be a similar question that's already been answered or is pending a response.
11
11
12
-
If you did not find a related issue among the already asked, feel free to open a new issue.
12
+
If you haven't found any related issues among the already asked, feel free to open a new one.
13
13
14
-
For new feature requests, any sort of bug, anomaly, issue etc. please try to provide us structured information as listed below.
15
-
You don't have to follow it to the letter but having it structured like below may save us a lot of time to pinpoint and fix the issue quicker.
14
+
For new feature requests, any sort of bug, anomaly, issue, etc. please try to provide information, as structured below.
15
+
You don't have to follow it to the letter, but having it structured like below may save us a lot of time to pinpoint and fix the issue quicker.
16
16
17
17
### New issue structure (bugs, anomalies, improvements...)
18
18
Providing the following information will increase the chances of your issue being dealt with quickly:
19
19
20
-
***Short TO-THE-POINT Overview** - what seems to be the issue
20
+
***Short TO-THE-POINT Overview** - what seems to be the issue.
21
21
***Description** - more detailed explanation of the issue. The stack trace in cases where it is applicable.
22
-
***Which `Infobip.Api.Client` version(s)** - which library version(s) did you used when occurred with this issue.
23
-
***Environment** - is this a problem with all development/testing/production environments or only specific one(s)?
24
-
***Reproducing** - how did it happen? Is it an isolated anomaly, can you reproduce it, what are the steps to reproduce it?
22
+
***Which `Infobip.Api.Client` version(s)** - which library version(s) did you use when the issue occurred.
23
+
***Environment** - is this a problem with all development/testing/production environments or only a specific one(s)?
24
+
***Reproducing** - how did it happen? Is it an isolated anomaly, can you recreate it, what are the steps to recreate it?
25
25
***Related Issues** - is there something similar to this issue that has been reported before? If so, please tag that issue(s) as a reference.
26
-
***Suggest a Fix** - this code is generated, but perhaps you can point to the part of the code that might be causing the bug.
26
+
***Suggest a Fix** - this code is auto generated, but perhaps you can provide us with your code sample as a fix to the part of the code that is causing the bug.
27
27
28
28
## Pull requests disclaimer
29
-
We will not be accepting pull requests. However, because source code within this repository is **generated**, hence the changes will need to be made by us within library generation configuration.
30
-
Having said that, we still fully do encourage you to submit an issue since that will help us track it and keep you up-to-date.
29
+
We will not be accepting any pull requests, as the source code within this repository is **auto generated**. Any change needs to be made by us within the library generation configuration.
30
+
Having said that, we still fully encourage you to submit an issue, since that will help us track it and keep you up to date.
@@ -8,8 +10,6 @@ To use this library you'll need an Infobip account. You can create a [free trial
8
10
9
11
The library is built on top of [OpenAPI Specification](https://swagger.io/specification/) and powered by [OpenAPI Generator](https://openapi-generator.tech/).
Before initializing client we have to prepare `Configuration` object for handling authentication.
57
-
We support multiple authentication methods, e.g. you can use [API Key Header][authentication-apikey].
58
-
In this case value for `ApiKeyPrefix` in example below will be `App`.
57
+
The library supports the [API Key Header](https://www.infobip.com/docs/essentials/api-essentials/api-authentication#api-key-header) authentication method.
59
58
To see your base URL, log in to the [Infobip API Resource][apidocs] hub with your Infobip account.
60
59
61
60
```csharp
62
61
varconfiguration=newConfiguration()
63
62
{
64
-
BasePath="<put your base URL here>",
65
-
ApiKeyPrefix="<put API key prefix here (App/Basic/IBSSO/Bearer)>",
63
+
BasePath="<put your base URL here prefixed by https://>",
66
64
ApiKey="<put your API key here>"
67
65
};
68
66
```
69
67
70
68
Next step is to initialize the API client. In this case we're instantiating the SMS API client.
71
69
```csharp
72
-
varsendSmsApi=newSendSmsApi(configuration);
70
+
varsmsApi=newSmsApi(configuration);
73
71
```
74
72
75
73
Since library is utilizing the `HttpClient` behind the scene for handling the HTTP calls you can provide your own instance of `HttpClient` to `SendSmsApi` constructor and have a control over its lifecycle.
Here's a simple example for sending an SMS message. First prepare the message by creating an instance of `SmsAdvancedTextualRequest` and its nested objects.
82
80
83
81
```csharp
84
-
varsmsMessage=newSmsTextualMessage()
85
-
{
86
-
From="InfoSMS",
87
-
Destinations=newList<SmsDestination>()
82
+
varsmsMessage=newSmsTextualMessage(
83
+
from: "SMSInfo",
84
+
destinations: newList<SmsDestination>()
88
85
{
89
86
newSmsDestination(to: "41793026727")
90
87
},
91
-
Text="This is a dummy SMS message sent using Infobip.Api.Client"
92
-
};
88
+
text:"This is a dummy SMS message sent using Infobip.Api.Client"
@@ -127,7 +126,7 @@ Bulk ID will be received only when you send a message to more than one destinati
127
126
For each SMS that you send out, we can send you a message delivery report in real time. All you need to do is specify your endpoint when sending SMS in `notifyUrl` field of `SmsTextualMessage`, or subscribe for reports by contacting our support team.
128
127
e.g. `https://{yourDomain}/delivery-reports`
129
128
130
-
You can use data models from the library and the pre-configured `Newtonsoft.Json` serializer (version 12.0.3).
129
+
You can use data models from the library and the pre-configured `Newtonsoft.Json` serializer (version 13.0.3).
131
130
132
131
Example of webhook implementation:
133
132
@@ -146,12 +145,17 @@ If you prefer to use your own serializer, please pay attention to the supported
146
145
Library is using custom date format string `yyyy-MM-ddTHH:mm:ss.fffzzzz` when serializing dates. This format does not exactly match the format from our documentation above, but it is the closest possible. This format produces the time zone offset value with `:` as time separator, but our backend services will deserialize it correctly.
147
146
148
147
#### Fetching delivery reports
149
-
If you are for any reason unable to receive real time delivery reports on your endpoint, you can use `messageId` or `bulkId` to fetch them.
148
+
If you are for any reason unable to receive real time delivery reports on your endpoint, you can use our [Delivery reports API](https://www.infobip.com/docs/api/channels/sms/logs-and-status-reports/get-outbound-sms-message-delivery-reports) to fetch them.
150
149
Each request will return a batch of delivery reports - only once.
150
+
You can filter reports by multiple parameters (see API's documentation for full list), for example, by `bulkId`, `bulkId` and `limit` like in the snippet below:
0 commit comments