trinsic_api
TrinsicApi - the Ruby gem for the Connect API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
This SDK is automatically generated by the OpenAPI Generator project:
- API version: v1
- Package version: 0.2.3
- Generator version: 7.7.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build trinsic_api.gemspec
Then either install the gem locally:
gem install ./trinsic_api-0.2.3.gem
(for development, run gem install --dev ./trinsic_api-0.2.3.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'trinsic_api', '~> 0.2.3'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'trinsic_api', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'trinsic_api'
# Setup authorization
TrinsicApi.configure do |config|
# Configure Bearer authorization: Bearer
config.access_token = 'YOUR_BEARER_TOKEN'
# Configure a proc to get access tokens in lieu of the static access_token configuration
config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
end
api_instance = TrinsicApi::AttachmentsApi.new
opts = {
exchange_attachment_access_key_request: TrinsicApi::ExchangeAttachmentAccessKeyRequest.new({attachment_access_key: 'attachment_access_key_example'}) # ExchangeAttachmentAccessKeyRequest |
}
begin
#Exchange an Attachment Access Key (from `IdentityData.Attachments`) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later.
api_instance.(opts)
rescue TrinsicApi::ApiError => e
puts "Exception when calling AttachmentsApi->exchange_attachment_access_key: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.trinsic.id
Class | Method | HTTP request | Description |
---|---|---|---|
TrinsicApi::AttachmentsApi | exchange_attachment_access_key | POST /api/v1/attachments/exchange | Exchange an Attachment Access Key (from IdentityData.Attachments ) for the raw contents of the attachment. Use this API to fetch document (front, back, portrait) or other (selfie) images from a verification, if relevant. In some cases, attachments may not be immediately available after a verification is completed. If so, this endpoint will return an HTTP 202 code, and you should try again later. |
TrinsicApi::NetworkApi | identity_lookup | GET /api/v1/network/identities/phoneNumber | Query the availability of an identity in the Trinsic Network by phone number |
TrinsicApi::NetworkApi | list_providers | GET /api/v1/network/providers | List all identity providers available for use |
TrinsicApi::SessionsApi | cancel_session | POST /api/v1/sessions/sessionId/cancel | Cancel a Session by its ID |
TrinsicApi::SessionsApi | create_session | POST /api/v1/sessions | Create a Session to verify a user's identity |
TrinsicApi::SessionsApi | exchange_results_key | POST /api/v1/sessions/sessionId/results/exchange | Exchange a Results Access Key for Identity Data |
TrinsicApi::SessionsApi | get_session | GET /api/v1/sessions/sessionId | Get a Session by its ID |
TrinsicApi::SessionsApi | list_sessions | GET /api/v1/sessions | List Sessions created by your account |
TrinsicApi::SessionsApi | redact_session | POST /api/v1/sessions/sessionId/redact | Redact a Session, removing all identity data from Trinsic's servers. Identity data that a user has chosen to save in their passkey-protected wallet will not be deleted. |
Documentation for Models
- TrinsicApi::Address
- TrinsicApi::Attachments
- TrinsicApi::CancelSessionResponse
- TrinsicApi::CreateSessionRequest
- TrinsicApi::CreateSessionResponse
- TrinsicApi::DisclosedFields
- TrinsicApi::DisclosedFieldsRequest
- TrinsicApi::DocumentData
- TrinsicApi::ExchangeAttachmentAccessKeyRequest
- TrinsicApi::ExchangeResultsKeyRequest
- TrinsicApi::ExchangeResultsKeyResponse
- TrinsicApi::FailureMessage
- TrinsicApi::GetSessionResponse
- TrinsicApi::IdentityData
- TrinsicApi::IdentityLookupResponse
- TrinsicApi::ListProvidersResponse
- TrinsicApi::ListSessionsResponse
- TrinsicApi::OrderDirection
- TrinsicApi::PersonData
- TrinsicApi::ProviderInfo
- TrinsicApi::Session
- TrinsicApi::SessionFailCode
- TrinsicApi::SessionOrdering
- TrinsicApi::SessionState
- TrinsicApi::ValidationResult
- TrinsicApi::Verification
- TrinsicApi::VerificationFailCode
Documentation for Authorization
Authentication schemes defined for the API:
Bearer
- Type: Bearer authentication