Skip to content
mattintechPublic

About

A colleciton of python code leveraging the KCS APIs via the PyKTL library. **Not an offical Samsung Repository**

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

8 Commits

Folders and files

Repository files navigation

BuildStatus PyPI Version Active branch

Python Knox Access token - Helper (PyKATh)

This is not an offical Samsung library or repository

A colleciton of python code that assists in the creation of a signed access token to be used with the Samsung Knox Cloud Service 'KCS' APIs.
For more information on the flow of Samsung's Knox Cloud Authentication API - see their tutorial here: (https://docs.samsungknox.com/dev/knox-cloud-authentication/tutorial/tutorial-for-customers-generate-access-token/)

Currently supported KCS APIs

This library can generate signed Tokens for the following Samsung KC Services:

  • Knox Mobile Enrollment ('KME')
  • Knox Conifgure ('KC')
  • Knox E-FOTA ('KE1')
  • Knox Asset Intelligence ('KAI')
  • Knox Guard ('KG')
  • Knox Deployment Program ('KDP')

Todo

  • Knox Manage ('KM') is currently not supported, but work is in progress.

Prerequesits

pip install PyKATh requests

Getting Started

## Initialize the Knox Token Library. 
kat = knox_common.KnoxAccessToken(kcsKeyFilePath = 'keys.json', regionalServer = 'us-kcs-api.samsungknox.com', clientId = cId)

## request a signed token for a specific KCS ClientId.
signedKCSToken = kat.getSignedAccessToken()

## Use this balue in the 'x-knox-apitoken' header to call most KCSAPis (for 30mins) in the
print(signedKCSToken) 

Full python examples interacting with the KCS API can be found here.

TODO

  • docs
  • KM API Helper
  • add error correction

About

A colleciton of python code leveraging the KCS APIs via the PyKTL library. **Not an offical Samsung Repository**

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages