inkslot
GitHub

Four values before you deploy

Cloudflare's set-up page asks for four values it can't create for you. Get them here, keep a copy, then continue.

  1. LINKEDIN_ACCESS_TOKEN

    Lets the Worker post as you. It comes from your own LinkedIn app, so no one else's app ever holds it.

    1. Create an app on LinkedIn's developer site. LinkedIn asks for a Page; any Page you belong to works, or an empty one.
    2. In its Products tab, add Share on LinkedIn and Sign In with LinkedIn using OpenID Connect.
    3. Open the Token Generator, pick your app, tick openid, profile and w_member_social, sign in, and copy the token.

    This token can post as you. Never put it in a file, a commit, an issue or a chat.

  2. LINKEDIN_TOKEN_EXPIRES

    The day the token stops working: the day you made it plus 60 days, as YYYY-MM-DD. /status warns you 7 days before.

    If you make the token today

    Made it another day? Count 60 days from that day.

  3. ADMIN_TOKEN

    Opens your Worker's /status page, with the queue, the history and the token's expiry. Any long random string.

    In a terminal

    openssl rand -hex 32

    Or here, in your browser

    Not generated yet

    Made with your browser's crypto API. It is never sent anywhere.

    Save a copy in your password manager: you need it to open /status.

  4. DRY_RUN

    1 runs everything without reaching LinkedIn, for a first test. 0 posts for real.

    1

    It is written into your copy's wrangler.jsonc. To change it later, edit it there and push.

  5. On Cloudflare's page

    • Connect GitHub, then tick Create private Git repository: your copy holds your drafts.
    • Name the project, the D1 database and the KV namespace with names nothing on your account already uses.
    • Paste the four values into the fields with the same names, then deploy.

Cloudflare opens in a new tab, so this page stays here to copy from.

After the deploy

  • Your Worker's URL is near the end of the build log: dashboard, your Worker, Deployments.
  • Set your timezone in scheduler.json, for example "Europe/Paris". It's UTC by default.
  • Write a post and push. Every push to main deploys and syncs your posts.

Check that it runs

curl -H "Authorization: Bearer $ADMIN_TOKEN" https://<your-worker>.workers.dev/status