Unless you say what you want to achieve, no one will know or understand the error and assist you. Are you trying to create an api user?
1. Generate UUID from this site https://fusionauth.io/dev-tools/uuid-generator
- Apply that reference id also known as the app reference and apply to the headers.
- Fetch the subscription id from your account and apply to the headers.
here is my code below that is giving me the error message
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main(string[] args) // <-- async Task instead of void
{
var url = "https://sandbox.momodeveloper.mtn.com/v1_0/apiuser";
var requestBody = "{ \"example\": \"value\" }";
using (var client = new HttpClient())
{
client.DefaultRequestHeaders.Add("X-Reference-Id", "d7791f6c-e620-47b5-b813-21836c42221a");
client.DefaultRequestHeaders.Add("Cache-Control", "no-cache");
client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "xxxxxxxxxxxxxxx");
var content = new StringContent(requestBody, Encoding.UTF8, "application/json");
var response = await client.PostAsync(url, content);
string result = await response.Content.ReadAsStringAsync();
Console.WriteLine($"Status Code: {response.StatusCode}");
Console.WriteLine("Response:");
Console.WriteLine(result);
}
}
}
what is wrong with this code? Help
Request body should contain the call back URL like so
```
{
"providerCallbackHost": “http://devhost.webhook-testing.tr3nn3.com”
}
```
instead of where you put an object into a string so in effect your request body is a string instead of an object
```
"{ \"example\": \"value\" }"
```