Skip to content

Instantly share code, notes, and snippets.

View lkdocs's full-sized avatar

LaunchKey Documentation Examples lkdocs

View GitHub Profile
curl -X PUT https://api.launchkey.com/v1/logs \
-d app_key=1234567890 \
--data-urlencode secret_key=SECRET_KEY \
--data-urlencode signature=SIGNATURE \
-d action=Authenticate \
-d status=True \
-d auth_request=AUTH_REQUEST
curl -X PUT https://api.launchkey.com/v1/logs \
-d app_key=1234567890 \
--data-urlencode secret_key=SECRET_KEY \
--data-urlencode signature=SIGNATURE \
-d action=Revoke \
-d status=True \
-d auth_request=AUTH_REQUEST
<?php
$app_key = 1234567890;
$secret_key = "SECRET_KEY";
$private_key = file_get_contents("/path/to/private.key");
$launchKey = \LaunchKey\SDK\Client::factory($app_key, $secret_key, $private_key);
?>
<?
$launchkey->ping();
?>
<?php
$authRequest = $launchkey->auth()->authenticate("LaunchKeyUserName");
?>
# Import Python library
import launchkey
app_key = 1234567890
secret_key = "SECRET_KEY"
private_key = open("/path/to/private.key", "r").read()
api = launchkey.API(app_key, secret_key, private_key)
# Set session = False for a transactional auth request
session = True
#Set user_push_id to True if you would like to be returned a value that can be used to push requests to the user in the future
user_push_id = False
auth_request = api.authorize("username", session, user_push_id)
auth_response = api.poll_request(auth_request)
<?php
$authResponse = $launchkey->auth()->getStatus("authRequestId");