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
To use Entitlements Admin SDK in an iOS app, you need to install the Sudo Entitlements Admin package via Swift Package Manager
Open your project settings in XCode, and go to the Package Dependencies
tab. Click on the +
sign to add a dependency.
Enter the repository URL https://github.com/sudoplatform/sudo-entitlements-admin-ios
in the top right search box and select the sudo-entitlements-admin-ios
repository.
Select the required version and Add Package
.
Sudo Platform SDKs conform to semantic versioning so in most cases you will leave the Dependency Rule as Up to Next Major Version
to receive regular updates without introducing any breaking changes.
This will resolve the local package dependency and install the latest version of the 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