Skip to content
Developers

Connect your own code

A server app, a token and your first API call.

About 4 min

  1. Make a server app

    Go to Settings, then Developers, then Your apps, and create a Server app. Copy the client ID and secret and keep the secret safe.

  2. Get a token

    Swap them for an access token. It lasts an hour: get a new one the same way.

    curl https://kata.now/oauth/token \
      -u "$KATA_CLIENT_ID:$KATA_CLIENT_SECRET" \
      -d grant_type=client_credentials
  3. Send a task

    Call the API with the token. Add an Idempotency-Key so a retry never makes a second task.

    curl https://kata.now/api/v1/tasks \
      -H "Authorization: Bearer $KATA_TOKEN" \
      -H "Idempotency-Key: lead-4821" \
      -H "Content-Type: application/json" \
      -d '{ "instructions": "Check that +1 555 0100 belongs to Sam Lee.", "test": true }'
  4. Use the OpenAPI file

    Load the OpenAPI file into Postman, Insomnia or a client generator to get every endpoint and field.

    https://kata.now/api/v1/openapi.json

Good to know

  • Try requests from the browser with the playground in Settings, then Developers.

Related guides

Something unclear? Email hello@kata.now.

All guides