Authenticate

The authenticate function is the foundation of the Truvideo SDK. It securely initiates a session and prepares the SDK for capturing, uploading, and editing media.

This guide will walk you through integrating authentication into your project using the Truvideo Core Module.


Authentication Integration Guide

Prerequisites

Before you begin:

  • Make sure the Core module is integrated. See Installation

  • Request your API Key and Secret Key from Truvideo.


Step-by-Step Authentication Flow

Step 1: Prepare Your Credentials

Ensure you have:

  • API Key

  • Secret Key

  • External Id (If provided)

These are needed to sign each authentication request securely.


Step 2: Generate a Secure Signature

The SDK requires a hashed signature to validate each request. Follow this process to generate one:

  1. Build the Payload

    • Use TruvideoSdk.GeneratePayload() to create a dynamic payload string.

  2. Sign the Payload

    • Hash the payload using HMAC-SHA256 with your Secret Key.

  3. Encode the Signature

    • Convert the hash into a hexadecimal string or base64 format.

  4. Send the Signature

    • Include the signature in your authentication request.


Imports

Async Callback Wrapper

To get callbacks from native wrapper is needed

  1. Test Connection

  • Run tests to confirm successful integration.

Final Steps: Test Your Integration

After implementing the authentication:

  • Run your application to verify that the SDK session initializes successfully.

  • Monitor the logs for any issues related to signatures or tokens.

  • Once confirmed, proceed to explore media capture, uploading, and editing features.


Thank you for using the Truvideo SDK. You're now authenticated and ready to explore all features!

Last updated

Was this helpful?