CloudKit JS API token is not working Please HELP!

I have written question in detail on stack overflow

You can answer me on this forum or on stack overflow.