PHP code example of siddharthbhansali / dev-authkit-php

1. Go to this page and download the library: Download siddharthbhansali/dev-authkit-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

siddharthbhansali / dev-authkit-php example snippets


  // file endpoint.php

uthKit;

$authkit = new AuthKit("sk_live_12345");
$response = $authkit->create([
	"group" => "meaningful-id", // a meaningful identifier (i.e., organizationId)
	"label" => "Friendly Label", // a human-friendly label (i.e., organizationName)
]);

echo json_encode($response);



use Illuminate\Support\Facades\Route;
use IntegrationOS\AuthKit\AuthKit;

Route::get('/create-embed-token', function () {
    $authkit = new AuthKit("sk_live_12345");
	
    $response = $authkit->create([
        "group" => "meaningful-id", // a meaningful identifier (i.e., organizationId)
        "label" => "Friendly Label", // a human-friendly label (i.e., organizationName)
    ]);
    
    return $response;
});