Comment on page
Getting Started
Warning: This documentation is in early alpha and may not work properly, if you have any issues getting setup, email [email protected] for help. Additionally, make sure you test your build in our sandbox environment first before putting it in production!
You are responsible for all custom development and what you choose to release. KAPED accepts no liability for faulty builds, loss, or damage that stems from a custom solution designed by you!
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
After testing your build in the sandbox environment, you can request an API key by emailing [email protected] with the subject line "API Key Request".
Any events created by you will return an error if you do not use the same email address that is linked to your account (AKA: the email used to signup)
The Bearer Token is needed for all API calls with the exception of the Login API.
To make your first request, send an authenticated request to the login-token endpoint. This will create a
bearer token
, which is nice.post
https://api.kaped.io/partner
/login-token
Login
Token Validation: 1hr
KAPED-Partner-API-V1.0.0.yaml
12KB
Code
OpenAPI 3.0 Specifications
Take a look at how you might call this method using our official libraries, or via
curl
:curl
Java
Obj-C
Javascript
C#
PHP
curl -X POST\
-H "Content-Type: application/json"\
"https://api.kaped.io/partner/login-token"
Java SDK
1
// require the partner-api module and set it up with your API key
2
import io.swagger.client.*;
3
import io.swagger.client.auth.*;
4
import io.swagger.client.model.*;
5
import io.swagger.client.api.RESTCallsApi;
6
7
import java.io.File;
8
import java.util.*;
9
10
public class RESTCallsApiExample {
11
12
public static void main(String[] args) {
13
14
RESTCallsApi apiInstance = new RESTCallsApi();
15
Login body = {
16
"username" : "[email protected]"
17
}; // Login |
18
String apiKey = apiKey_example; // String |
19
try {
20
apiInstance.loginTokenPost(body, apiKey);
21
} catch (ApiException e) {
22
System.err.println("Exception when calling RESTCallsApi#loginTokenPost");
23
e.printStackTrace();
24
}
25
}
26
}
27
Obj-C SDK
1
Login *body = {
2
"username" : "[email protected]"
3
}; //
4
String *apiKey = apiKey_example; //
5
6
RESTCallsApi *apiInstance = [[RESTCallsApi alloc] init];
7
8
// Login
9
[apiInstance loginTokenPostWith:body
10
apiKey:apiKey
11
completionHandler: ^(NSError* error) {
12
if (error) {
13
NSLog(@"Error: %@", error);
14
}
15
}];
1
var KapedPartnerApi = require('kaped_partner_api');
2
3
var api = new KapedPartnerApi.RESTCallsApi()
4
var body = {
5
"username" : "[email protected]"
6
}; // {{Login}}
7
var apiKey = apiKey_example; // {{String}}
8
9
var callback = function(error, data, response) {
10
if (error) {
11
console.error(error);
12
} else {
13
console.log('API called successfully.');
14
}
15
};
16
api.loginTokenPost(bodyapiKey, callback);
17
C# SDK
1
using System;
2
using System.Diagnostics;
3
using IO.Swagger.Api;
4
using IO.Swagger.Client;
5
using IO.Swagger.Model;
6
7
namespace Example
8
{
9
public class loginTokenPostExample
10
{
11
public void main()
12
{
13
14
var apiInstance = new RESTCallsApi();
15
var body = new Login(); // Login |
16
var apiKey = apiKey_example; // String |
17
18
try
19
{
20
// Login
21
apiInstance.loginTokenPost(body, apiKey);
22
}
23
catch (Exception e)
24
{
25
Debug.Print("Exception when calling RESTCallsApi.loginTokenPost: " + e.Message );
26
}
27
}
28
}
29
}
30
PHP SDK
1
<?php
2
require_once(__DIR__ . '/vendor/autoload.php');
3
4
$api_instance = new Swagger\Client\ApiRESTCallsApi();
5
$body = {
6
"username" : "[email protected]"
7
}; // Login |
8
$apiKey = apiKey_example; // String |
9
10
try {
11
$api_instance->loginTokenPost($body, $apiKey);
12
} catch (Exception $e) {
13
echo 'Exception when calling RESTCallsApi->loginTokenPost: ', $e->getMessage(), PHP_EOL;
14
}
15
?>
16
Last modified 10mo ago