Integrating the Administrative API

Integrate the Entitlements Administrative API with your own entitlements system

The Sudo Platform Entitlements administrative API is provided as a GraphQL API.

Invoke these APIs using a GraphQL client. You must specify an API key in a x-api-key header when making requests.

You can also use Sudo Entitlements Admin SDK to invoke these APIs in JavaScript, TypeScript, Swift or Kotlin. In order to use the SDK you must obtain the Sudo Platform client configuration file by following the instructions in Complete the Getting Started Guide.

Integrate the iOS SDK

Add this line to your Podfile.

pod 'SudoEntitlementsAdmin'

Install pod dependencies by running the following command in your project directory:

pod install --repo-update

This will update the local CocoaPods repository and install the latest version of the Sudo Entitlements Admin SDK.

Integrate the Android SDK

To use Sudo Entitlements Admin SDK in an Android app you need to add SudoEntitlementsAdmin library as a dependency to your project.

Edit the app module Gradle script (build.gradle) and add SudoEntitlementsAdmin library as a dependency.

dependencies {
    api 'com.sudoplatform:sudoentitlementsadmin:$latest_version'
}

Edit AndroidManifest.xml to add the following app permissions:

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
+   xmlns:tools="http://schemas.android.com/tools"
    package="com.sudoplatform.sampleapp">

+   <uses-permission android:name="android.permission.INTERNET" />
+   <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
+   <uses-permission android:name="android.permission.WAKE_LOCK" />
+   <uses-permission android:name="android.permission.READ_PHONE_STATE" />
+   <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+   <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

    <application
+       tools:replace="android:allowBackup"
+       android:allowBackup="false"

Integrate the JS SDK

To use the Sudo Entitlements Admin SDK in a Web or Node.js project, you must add @sudoplatform/sudo-entitlements-admin as a dependency to your project.

yarn add '@sudoplatform/sudo-entitlements-admin'
# or
npm install --save '@sudoplatform/sudo-entitlements-admin'

Initializing SudoEntitlementsAdminClient

let client = try DefaultSudoEntitlementsAdminClient(apiKey: apiKey)

For endpoint information and to obtain an API key send us a request.

Last updated