Unable to connect to CloudKit from server

Hello,


My code to connect to CloudKit and query records on public database works fine with iOS SDK.

But, when trying to authenticate using server to server, I have a 401 error (unauthorized).

Official Node.js sample code doesn't seems to work too. Also tried with "working" sample codes from the web in JS, Ruby and PHP. But it doesn't work.


Can someone help me?


Thanks,

Accepted Reply

OK. I have entered public key with "----- BEGIN ... ----- END" lines.

Removing these lines and now it works fine.

Replies

OK. I have entered public key with "----- BEGIN ... ----- END" lines.

Removing these lines and now it works fine.

^ solved my issue. Would be nice if the dashboard made this harder to do.