The Trinsic API Ruby library provides convenient access to the Trinsic API from applications written in Ruby.
Trinsic API Ruby Library
The Trinsic API Ruby library provides convenient access to the Trinsic API from applications written in Ruby.
Documentation
See the Trinsic docs for more detailed information on how to start integrating with our identity acceptance network.
Installation
Install the package with:
gem install trinsic_apior add it to your Gemfile
gem 'trinsic_api'
Usage
The package needs to be configured with your app's access token, which is available in the Trinsic Dashboard.
TrinsicApi.configure do |config|
config.access_token = ENV['TRINSIC_ACCESS_TOKEN']
end
attachments = TrinsicApi::AttachmentsApi.new
network = TrinsicApi::NetworkApi.new
sessions = TrinsicApi::SessionsApi.newYou can find a full Ruby server example in the samples folder.
Data residency
By default, the SDK communicates with https://api.trinsic.id. If you have a Verification Profile configured for EU data residency, point the SDK at the EU endpoint by setting the configuration host.
TrinsicApi.configure do |config|
config.host = 'https://api.eu.trinsic.id' # omit to use the default endpoint
config.access_token = 'your-access-token'
end
sessions = TrinsicApi::SessionsApi.newUnknown enum values
The API can add enum values after this SDK version was released. A value this
version does not know is read as the enum's UNKNOWN_DEFAULT_OPEN_API member
instead of failing the response:
if session.error_code == TrinsicApi::SessionErrorCode::UNKNOWN_DEFAULT_OPEN_API
# An error code newer than this SDK version.
endUpgrade the SDK to read the new value. Do not send the fallback member in
requests; the API does not accept it.
SDK Versioning
Our SDKs follow the Semantic Versioning ("SemVer") scheme.
For example, the version number 1.13.0 has a major version of 1, a minor version of 13, and a patch version of 0.
Breaking changes are only introduced alongside a new major version.
Support
Any issues, inquiries, and feature requests can be sent to [email protected], or feel free to open a GitHub issue here.
