A couple of weeks ago we released a new suite of .NET server helper libraries to help you build server side apps even quicker.
The old Sinch.SMS and Sinch.Core are now obsolete on nuget, and from now on you should use our new version:
And for WebAPIs we have a an extension:
If I may say so, they are awesome nugets that will help you build stuff super quick, you can read more about that in the following tutorials:
In this post I want to talk about a little hidden gem that the team has made. The Sinch.WebApiClient that is used in the above packages is open sourced on GitHub and is kind of wrapper library for managing and signing requests to our backend – you know how boring it is to deal with security. The cool thing is that it lets you create new requests with interfaces and filters so you can easily extend our and your own APIs both on the server and client and still have the nice typing.
Just the other week I found it extremely useful when our backend team released some new code but our SDK team was just a little bit behind. With just a couple of minutes of looking at the documentation over for a new request (Callouts), I could still use the current nuget from the SDK team. To do that I created an interface in my solution:
The attribute [ToBody] indicates that a parameter should be serialized to the body. Then there is a [ToURI] where you would add it to the URI instead. Just the request as specified in the docs. Now to use this you only have to create an APIFactory with this interface:
And the WepAPI client will take care of the signing of the requests and all for you. Super simple and super sweet.
Over and out.
For anyone who’s tried to implement an accurate yet user friendly UI flow capturing users’ phone numbers, this will resonate with you. For the others, luckily you will be able to avoid this hassle using our latest Verification SDKs. Getting… read more