Skip to main content

What is REST ?


REST API's gives you easy access to a system through basic HTTP requests.

Integration with MonoSign#


When you contact with MonoSign team, they will provide you some informations to make both systems are connected well.

You will also take some informations about endpoints.

Client Libraries#


MonoSign already have libraries for Asp.NET WebForms, Asp.NET MVC and Asp.NET Core.

If your applications one of them please feel free to ask your library from MonoSign.

Important Information#


All endpoints required MonoSign-AppId and MonoSign-AppKey header information and Content-Type must be application/json.

These information will be provided by MonoSign.

REST API Methods#


There are two methods to login with MonoSign.

1. SignIn Request and Result#


It is easy to integrate your authentication process with this method.

You just need to know 2 endpoints.

[POST] https://{baseApiUrl}/api/v1.3/signin#


When you want to authenticate a user, you must call this endpoint with following informations.

Headers#

MonoSign-AppId: {YOUR-APP-ID}MonoSign-AppKey: {YOUR-APP-KEY}Content-Type: application/json

Content (application/json)#

{  "CallbackUrl": "YOUR-CALLBACK-URL",  "Type": "Internal"}

Success (200)#

When you get success message your response content message will be like that.

{  "Data": {    "LoginUrl": "http://{baseAccountUrl}/login/{GUID}",    "RegisterUrl": "--UNIMPORTANT--",    "ForgettenPasswordUrl": "--UNIMPORTANT--",    "LogoutUrl": "http://{baseAccountUrl}/logout/{GUID}",    "AuthToken": "{AUTH-TOKEN}"  },  "Code": 1,  "Success": true}

IMPORTANT: You will redirect your user to Data.LoginUrl and all authentication process will be on MonoSign provided pages.

IMPORTANT: When a user authenticated on MonoSign, your user will be redirected to your callback url with AuthToken query string. This information will be used for getting your authentication result with following endpoint. You must keep this information and use when you want user's details.

Callback url can be predefined by MonoSign for your application or you can send this information in your request body as we show.

Error (5XX)#

When you get error message your response content message will be like that.

{  "Message": "Error",  "InternalMessage": "Invalid authentication request.",  "Code": 3,  "Success": false}

[GET] https://{baseApiUrl}/api/v1.3/signin/{auth_token}#


Headers#

MonoSign-AppId: {YOUR-APP-ID}MonoSign-AppKey: {YOUR-APP-KEY}Content-Type: application/json

Success (200)#

When you get success message your response content message will be like that.

{  "Code": 1,  "Data": {    "UserId": "{GUID}",    "UserName": "string",    "Email": "",    "Session": {      "SessionId": "{GUID}",      "UserId": "{GUID}",      "ApplicationUserId": "{GUID}",      "StartDate": "0001-01-01T00:00:00",      "UpdatedDate": "0001-01-01T00:00:00",      "ApplicationId": "{GUID}",      "Application": null,      "ExpirationDate": "0001-01-01T00:00:00",      "IsLocked": false,      "LockMessage": "",      "LogoutUrl": null,      "IsMfaVerified": false,      "IsExpired": false,      "BrowserName": null,      "BrowserVersion": null,      "OperatingSystem": null,      "DeviceType": 0,      "DeviceBrand": null,      "DeviceModel": null,      "DeviceName": null,      "Location": null,      "User": null,      "IsTwoFactorVerified": false,      "IsTwoFactorRequired": false,      "LocationInfo": null,      "UserIp": null    },    "Profile": {      "ProfileId": "{GUID}",      "IsRequireUpdate": false,      "Values": {        "MobilePhone": "string",        "ProfilePhotoUrl": "{url}"      }    },    "State": 1,    "IsActive": true,    "Culture": "en",    "MfaRequired": true,    "PasswordChangeRequired": false,    "PasswordChangeType": 0,    "TimeZone": "",    "IsFavorite": false,    "ApplicationId": "00000000-0000-0000-0000-000000000000",    "ExpirationDate": "0001-01-01T00:00:00",    "IsExpired": true  },  "Success": true}

IMPORTANT: Profile or Profile Values fields can be null and do not forget to do null-check in your code.

Error (5XX)#

When you get error message your response content message will be like that.

{  "Message": "Error",  "InternalMessage": "",  "Code": 3,  "Success": false}

Help#

If you need any help or getting an error from endpoints please feel free to contact with team.

2. Custom API Calls#


This method blocked by many organization because of security concerns. When you use this method you can create custom Authentication Form to authenticate user.

These detailed informations will be provided if neccessary.