AfricasTalkingLtd / africastalking.Net

Africa's Talking API Wrapper for C#
https://developers.africastalking.com
MIT License
18 stars 38 forks source link

ASP.NET Core API Not working with Africa's Talking USSD Service #46

Closed Jcardif closed 3 years ago

Jcardif commented 4 years ago

I created a dotnet core API to provide the callback URL for the USSD Service. But the API does not work the USSD Services gives the error below: image

My controller is designed as follows:


 [Route("api/[controller]")]
    [ApiController]
    public class ServicesController : ControllerBase
    {
        [Route("ussd")]
        [HttpPost]
        public IActionResult USSDService([FromBody] USSDResponse serviceResponse)
        {

        }
    }

However the USSD service works when the method is changed as follows:

        public IActionResult USSDService(string serviceResponse)
        {

        }

But the issue is that no object is passed from the USSD Service to this method

TheBeachMaster commented 4 years ago

@Jcardif see example on step 7