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/)
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.
pip install PyKATh requests
## 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.
- docs
- KM API Helper
- add error correction