Skip to content

Releases: getyoti/yoti-dotnet-sdk

v3.20.0

Choose a tag to compare

@mehmet-yoti mehmet-yoti released this 26 May 16:01
5471420

Fixed

QR Code API Path Construction

  • Fixed URL path concatenation bug in QR code endpoints
    • CreateQrCode: Now correctly uses /v2/sessions/{sessionId}/qr-codes instead of /v2/sessions/0/qr-codes
    • GetQrCode: Now correctly uses /v2/qr-codes/{qrCodeId} instead of /v2/qr-codes/0
    • Session ID and QR code ID are now properly interpolated into request paths

v3.19.0

Choose a tag to compare

@mehmet-yoti mehmet-yoti released this 23 Mar 16:57
f07a02c

Summary

Implements read-only support for the new SHARE_CODE resource type in IDV session data.

Share codes are managed server-side — this SDK change only provides read access to retrieve share code resources from existing sessions.

Usage Example

// Get session with share codes
GetSessionResult session = await docScanClient.GetSessionAsync(sessionId);

// Access share codes from resources
List<ShareCodeResourceResponse> shareCodes = session.Resources.ShareCodes;

foreach (var shareCode in shareCodes)
{
    Console.WriteLine($"Share Code ID: {shareCode.Id}");
    Console.WriteLine($"Source: {shareCode.Source}");
    Console.WriteLine($"Created: {shareCode.CreatedAt}");
    Console.WriteLine($"Last Updated: {shareCode.LastUpdated}");
    
    // Access media references
    if (shareCode.LookupProfile?.Media != null)
        Console.WriteLine($"Lookup Profile Media ID: {shareCode.LookupProfile.Media.Id}");
    
    if (shareCode.ReturnedProfile?.Media != null)
        Console.WriteLine($"Returned Profile Media ID: {shareCode.ReturnedProfile.Media.Id}");
    
    if (shareCode.IdPhoto?.Media != null)
        Console.WriteLine($"ID Photo Media ID: {shareCode.IdPhoto.Media.Id}");
    
    if (shareCode.File?.Media != null)
        Console.WriteLine($"File Media ID: {shareCode.File.Media.Id}");
    
    // Get verify share code tasks
    List<VerifyShareCodeTaskResponse> tasks = shareCode.GetVerifyShareCodeTasks();
    foreach (var task in tasks)
    {
        Console.WriteLine($"Task ID: {task.Id}, State: {task.State}");
    }
}

Add applicant profile deserialization support for GET sessions response

Summary

This PR adds support for deserializing applicant_profiles from the GET /sessions response, allowing Relying Businesses to fetch applicant profile resources.

Changes

  • Added CreatedAt and LastUpdated properties to ApplicantProfileResourceResponse
  • Added unit tests for applicant profile deserialization
  • Updated DocScan example Success page to display ApplicantProfiles when present

Usage Example

GetSessionResult session = client.GetSession(sessionId);

if (session.Resources.ApplicantProfiles != null)
{
    foreach (var profile in session.Resources.ApplicantProfiles)
    {
        Console.WriteLine($"ID: {profile.Id}");
        Console.WriteLine($"Source: {profile.Source?.Type}");
        Console.WriteLine($"Created: {profile.CreatedAt}");
        Console.WriteLine($"Updated: {profile.LastUpdated}");
        Console.WriteLine($"Media ID: {profile.Media?.Id}");
    }
}

v3.18.0

Choose a tag to compare

@mehmet-yoti mehmet-yoti released this 27 Oct 11:20
2da8475

Added Methods to create QR codes for sessions and retrieve QR code/session details

Added Simplifies the CreateQrCode API by removing the QrRequest payload parameter

Added Includes example implementation with validation

Added "X-Request-ID" on responses

v3.17.0

Choose a tag to compare

@mehmet-yoti mehmet-yoti released this 17 Oct 14:22
d6e0021

Added Failure receipt error details

Added Failure reason info to IDV Get session results

Added Seperate Builder for Notification

var notification = new NotificationBuilder()
                   .WithUrl("https://example.com/webhook")
                   .WithMethod("POST")
                   .WithVerifyTls(true)
                   .Build();

               var policy = new PolicyBuilder()
                   .WithWantedAttribute(givenNamesWantedAttribute)
                   .WithFullName()
                   .Build();

               var sessionReq = new ShareSessionRequestBuilder().WithPolicy(policy)
                   .WithNotification(notification)                

v3.16.0

Choose a tag to compare

@mehmet-yoti mehmet-yoti released this 14 May 19:53
8330968

Added

  • Added support for Share v2 (Create Session, Retrieve Session, Create Qr Code, Retrieve Qr Code, Retrieve Receipt)
  • Added support for optional attribute configuration to SDK
  • Add support for advanced identity profiles to Share V2 and Examples
    Example:
var policy = new PolicyBuilder()
                    .WithFullName()
                    .WithEmail()
                    .WithPhoneNumber()
                    .WithSelfie()
                    .WithAgeOver(18)
                    .WithNationality()
                    .WithGender()
                    .WithDocumentDetails()
                    .WithDocumentImages()           
                    .Build();

                var sessionReq = new ShareSessionRequestBuilder().WithPolicy(policy)
                    .WithNotification(new Notification
                    {
                        Headers = { },
                        Url = "https://example.com/webhook",
                        Method = "POST",
                        VerifyTls = true
                        
                    })
                    .WithRedirectUri("https:/www.yoti.com").WithSubject(new
                    {
                        subject_id = "some_subject_id_string"
                    }).Build();

                var SessionResult = yotiClient.CreateShareSession(sessionReq);

v3.15.0

Choose a tag to compare

@mehmet-yoti mehmet-yoti released this 13 Feb 18:39
d53bf73

Added

  • Added support for enabling expanded document fields
  • Added support to retrieve expanded doc fields and media, added succeed page examples

Example:

 .WithRequestedTask(
                    new RequestedTextExtractionTaskBuilder()
                    .WithManualCheckFallback()
                    .WithChipDataDesired()
                    .WithCreateExpandedDocumentFields()
                    .Build()
                )

Added

  • Added support for advanced identity profiles to share v1

Example:

AdvancedIdentityProfile data = new AdvancedIdentityProfile
            {
                profiles = new List<Profile>
            {
                new Profile
                {
                    trust_framework = "UK_TFIDA",
                    schemes = new List<Scheme>
                    {
                        new Scheme
                        {
                            label = "LB912",
                            type = "RTW"
                        }
                    }
                },
                new Profile
                {
                    trust_framework = "YOTI_GLOBAL",
                    schemes = new List<Scheme>
                    {
                        new Scheme
                        {
                            label = "LB321",
                            type = "IDENTITY",
                            objective = "AL_L1"
                        }
                    }
                }
            }
            };

            var sessionSpec = new SessionSpecificationBuilder()
                .WithClientSessionTokenTtl(600)
                .WithResourcesTtl(90000)
                .WithUserTrackingId("some-user-tracking-id")
                .WithSdkConfig(
                    new SdkConfigBuilder()
                    .WithAllowsCameraAndUpload()
                    .WithPrimaryColour("#2d9fff")
                    .WithSecondaryColour("#FFFFFF")
                    .WithFontColour("#FFFFFF")
                    .WithLocale("en-GB")
                    .WithPresetIssuingCountry("GBR")
                    .WithSuccessUrl($"{_baseUrl}/idverify/success")
                    .WithErrorUrl($"{_baseUrl}/idverify/error")
                    .WithPrivacyPolicyUrl($"{_baseUrl}/privacy-policy")
                    .Build()
                    )
                .WithCreateIdentityProfilePreview(true)
                .WithAdvancedIdentityProfileRequirements(data)
                .WithSubject(new
                {
                    subject_id = "some_subject_id_string"
                })    
            .Build();

v3.14.0

Choose a tag to compare

@mehmet-yoti mehmet-yoti released this 21 Apr 15:23
8607339

Changed

  • Rename retries as attempts
    Requested With
SdkConfig sdkConfig = 
                .WithIdDocumentTextExtractionReclassificationAttempts(2)
                .WithIdDocumentTextExtractionReclassificationAttempts(3)
                .WithIdDocumentTextExtractionReclassificationAttempts(4)
                .Build();

Added

  • Add support for client session completion notification
    Requested With
  NotificationConfig notificationConfig =
              new NotificationConfigBuilder()
              .ForClientSessionCompletion()
              .Build();

IDV

Added

  • Add support for requesting the profile preview
    Requested With
 //Build Session Spec
            var sessionSpec = new SessionSpecificationBuilder()
                .WithClientSessionTokenTtl(600)
                .WithResourcesTtl(90000)
                .WithUserTrackingId("some-user-tracking-id")
                //Add Sdk Config (with builder)
                .WithSdkConfig(
                    new SdkConfigBuilder()
                    .WithAllowsCameraAndUpload()
                    .WithPrimaryColour("#2d9fff")
                    .WithSecondaryColour("#FFFFFF")
                    .WithFontColour("#FFFFFF")
                    .WithLocale("en-GB")
                    .WithPresetIssuingCountry("GBR")
                    .WithSuccessUrl($"{_baseUrl}/idverify/success")
                    .WithErrorUrl($"{_baseUrl}/idverify/error")
                    .WithPrivacyPolicyUrl($"{_baseUrl}/privacy-policy")
                    .Build()
                    )
                .WithCreateIdentityProfilePreview(true)
                 .WithIdentityProfileRequirements(new
                 {
                     trust_framework = "UK_TFIDA",
                     scheme = new
                     {
                         type = "DBS",
                         objective = "BASIC"
                     }
                 })
                .WithSubject(new
                {
                    subject_id = "some_subject_id_string"
                })    
            .Build();

v3.13.0

Choose a tag to compare

@mehmet-yoti mehmet-yoti released this 11 Jan 15:17
2e3b570

Added

  • Support for non latin documents when fetching session configuration
  • Support for non latin-documents when fetching supported documents

Added

  • Static Liveness Check

Example:

.WithRequestedCheck(
   new RequestedLivenessCheckBuilder()
    .ForStaticLiveness()
   .Build()
)

Added

  • Face Comparison Check
    Example:
.WithRequestedCheck(
    new RequestedFaceComparisonCheckBuilder()
    .WithManualCheckNever()
   .Build()
)

Added

  • Support for non-latin documents at session creation

Example:

.WithRequiredDocument(
   new RequiredIdDocumentBuilder()
   .WithFilter(
       (new OrthogonalRestrictionsFilterBuilder())
       .WithIncludedDocumentTypes(new List<string> { "PASSPORT" })
       .isAllowNonLatinDocuments(true)
  .Build()
 )
 .Build()
 )

Added

  • Support for expired documents at session creation

Example:

 .WithRequiredDocument(
     new RequiredIdDocumentBuilder()
      .WithFilter(
     (new OrthogonalRestrictionsFilterBuilder())
         .WithIncludedDocumentTypes(new List<string> { "PASSPORT" })
         .withAllowExpiredDocuments()
         .Build()
      )
 .Build()
 )

v3.12.0

Choose a tag to compare

@echarrod echarrod released this 28 Jul 13:07
859c3b9

Added

  • Items to YotiProfileException:
    • ErrorCode
    • ResponseContent

Example:

using Yoti.Auth.Exceptions;

try
{
	ActivityDetails activityDetails = client.GetActivityDetails(encryptedToken);
}
catch (YotiProfileException profileEx)
{
	string errorCode = profileEx.ErrorCode;
	string responseContent= profileEx.ResponseContent;
}

v3.11.0

Choose a tag to compare

@BenSmithYoti BenSmithYoti released this 03 May 10:41
1ad9575

Profile

Demo available, when running the .NET Core example project, at https://localhost:44344/dbs-check

Added

  • WithIdentityProfileRequirements() to DynamicPolicyBuilder to specify Identity Profile Requirements:
DynamicPolicy dynamicPolicy = new DynamicPolicyBuilder()
.WithIdentityProfileRequirements(new { 
	trust_framework = "UK_TFIDA",
	scheme = new
	{
		type = "DBS",
		objective = "STANDARD"
	}
}).Build();
  • WithSubject() to DynamicScenarioBuilder to specify subject_id when used with WithIdentityProfileRequirements():
DynamicScenario dynamicScenario = new DynamicScenarioBuilder()
.WithPolicy(dynamicPolicy)
.WithSubject(new {
	subject_id = "some_subject_id_string"
})
.Build();
  • Identity Profile Report attribute (JSON):
YotiAttribute<Dictionary<string, JToken>> identityProfileReport = profile.IdentityProfileReport
  • GetId() to Yoti attribute:
attribute.GetId();
  • GetAttributeById() to Yoti profile:
var selfie = profile.GetAttributeById<Yoti.Auth.Images.Image>("attribute_id");
var documentImages = profile.GetAttributeById<List<Yoti.Auth.Images.Image>>("attribute_id_2");

Removed

  • .NET 4.7 Example Project (.NET Core example still available)

Deprecated

  • profile.Attributes (use profile.AttributeCollection instead)

IDV

Added

  • Ability to specify Identity Profile Requirements and subject_id using WithIdentityProfileRequirements() and WithSubject() on SessionSpecificationBuilder:
SessionSpecification sessionSpec = new SessionSpecificationBuilder()
.WithIdentityProfileRequirements(new { 
	trust_framework = "UK_TFIDA",
	scheme = new
	{
		type = "DBS",
		objective = "STANDARD"
	}
})
.WithSubject(new {
	subject_id = "some_subject_id_string"
})
.Build();
  • IDV GetSessionResult:
    • Third Party Identity Fraud (One) Checks:
var checks = getSessionResult.GetThirdPartyIdentityFraudOneChecks();
  • IdentityProfile:
IdentityProfileResponse identityProfile = getSessionResult.IdentityProfile;
string subjectId = identityProfile.SubjectId;
string result = identityProfile.Result;
string failureReasonCode = identityProfile.FailureReason.ReasonCode;

MediaID can be retrieved with:

string mediaId = getSessionResult.IdentityProfile.Report["media"]["id"].ToString();

and used to retrieve the full identity profile report as JSON with a separate call:

MediaValue mediaValue = docScanClient.GetMediaContent("your-session-id", mediaId);