ckSession instead of ckWebAuthToken

Hello.

I am starting working with the

CloudKit Web Services


I am reading the documentation here:

https://developer.apple.com/library/content/documentation/DataManagement/Conceptual/CloutKitWebServicesReference/SettingUpWebServices/SettingUpWebServices.html#//apple_ref/doc/uid/TP40015240-CH24-SW1


I am trying to receive Getting the Web Authentication Token


After successfully login I am getting this json

Object

  1. appInfo:Object
    1. AdditionalSalt:"cec2731125ded8d34cbd3702e0c360b8b7b534fa04dbb2f0ea150b524b7739e5"
    2. AppDiscoverable:"false"
    3. AppId:"0"
    4. AppName:"iCloud.jovan.PhotoWebApp"
    5. ContainerEnvironment:"development"
    6. ContainerId:"iCloud.jovan.PhotoWebApp"
    7. DeveloperName:"UNKNOWN_DEVELOPER"
    8. LogoURL:""
    9. __proto__:Object
  2. ckSession:"48__24__AZLhIol7ffB34oNYrGP54rWKY5MiVdO+2+85oIiWPuKoK/KJ7r9cNivNwYd03iX/aDW6KL4wuAOVJZ0dAShqhT9ZhoUuW9ZZNPPQ7tzTcBNJ/itQI/uulkBi/51Rpijv/5ZypUYD9yGP3dyXQgDVlGSK8tUPHigigN7nO91DGkM1kaT11lXFBBCHlvZr0DX4tp1cxZ9/P/Q=__eyJYLUFQUExFLVdFQkFVVEgtUENTLUNsb3Vka2l0IjoiUVhCd2JEb3hPZ0VpWXd2Q0QyYmdCVWZrblo1cmp3dnl3Wjg1cHF1dTdLaFZPMThnMEx1bDhLeWRhMHR5SkhyUkZwT0JycEVicXNXWGhqUk9XbTlyd2pkZzB6K3JvZktOIiwiWC1BUFBMRS1XRUJBVVRILVBDUy1TaGFyaW5nIjoiUVhCd2JEb3hPZ0ZyZzEyZGNZSGk4WWRKYU0yK1pFMFRKaytrdTBBMmNZTG8vaUJPRlV1cEtKT3ExS1YvYjlBaldCeklwQTR5N2FUbXNrMDhCWjRsYVRoeWRTaSt3eE9PIn0="
  3. isICDP:false
  4. pcsDeleted:false
  5. permissions:Array[1]
    1. 0:Object
      1. ask:false
      2. name:"discoverability"
      3. __proto__:Object
    2. length:1
    3. __proto__:Array[0]
  6. status:0


But, as per documentation I should receive the

ckWebAuthToken instead of ckSession

Could you please help me? 

Looks like documenttion is incorrect or i do something wrong...

How to get the ckWebAuthToken or how to use this ckSession for requesting the web services?

Replies

Hello,


Did you manage to resolve this issue? I'm facing the same problem right now.


Any help would be greatly appreaciated. Thanks in advance.

From my Testing, ckSession itself is ckWebAuthToken Encode and append the ckSession string that you received to future requests. To URL encode the ckSession string, replace '+' with '%2B', '/' with '%2F', and '=' with '%3D'. For example, send a request to get the current user by appending the ckWebAuthToken string.