I threw together a script to import my Zenkit data. It’s not the most beautiful code you’ll ever lay your eyes upon (insert PHP mockery here), but it got the job done for me. I hope it proves useful to someone else:
Niceley done! I think there’s a task in the backlog for a Zenkit migration, will check if we can integrate this.
Although the documentation says you just need the API key, I found I needed the cookies too, which is why there’s a spot for it in the config file. There are two, access_token
and connect.sid
. My entry in the config file looked something like:
access_token=[long string]; connect.sid=[long string]
I got those from the browser tools as opposed to their API. The cookies theoretically expire, but I don’t remember running into that issue.
I have a place in the config file for a bearer token also, and I used it in Postman, but it doesn’t look like I used it in the import script. The API doesn’t mention it. I wager that’s another thing I plucked out of the browser when I was having trouble with the API key alone.