GDAP API: User Registration
Introduction
This article is describing our current GDAP API endpoint parameters, payloads and which call methods to use for specific tasks, and how to combine these workflows in C# implementation for User Registration flow.
Resource Links
Swagger UI - https://gdapbridge360.azurewebsites.net/api/swagger/ui
Base URL: https://gdapbridge360.azurewebsites.net/api/
Url: {baseurl}UserRegistration
Method: POST
Parameters
Key | Value | Description |
helmuts.reinis@appxite.com | Your AAD email address here | |
firstname | Helmuts | Your firstname here |
lastname | Reinis | Your lastname here |
Example:
POST - https://gdapbridge360.azurewebsites.net/api/UserRegistration?email=helmuts.reinis@appxite.com&firstname=Helmuts&lastname=Reinis
JSON Response 1 (If access is already registered) :
{
"Result": "Denied",
"Message": "It appears that this account is already registered: helmuts.reinis@appxite.com"
}
JSON Response 2 (Account with no prior association):
{
"Result": "Accepted",
"Message": "Expect an email in your inbox with more information: helmuts.reinis@appxite.com"
}
C# Method Example:
public async Task<string> NewUserRegistration(string baseUrl, string Username, string FirstName, string LastName)
{
string uri = $"{baseUrl}UserRegistration?email={Username}&firstname={FirstName}&lastname={LastName}";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
request.Method = "POST";
request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
using (HttpWebResponse response = (HttpWebResponse)await request.GetResponseAsync())
using (Stream stream = response.GetResponseStream())
using (StreamReader reader = new StreamReader(stream))
{
return await reader.ReadToEndAsync();
}
}
Calling this method from code:
var RegistrationResult = await loginAPI.NewUserRegistration(CurrentBaseUrl, Username, FirstName, LastName);
0
0
Was this article helpful?
0 out of 0 found this helpful
Add comment
Please sign in to leave a comment.