Go back

API Keys

December 1, 2022

Changelog

Ever wanted to connect to your app programmatically without logging in with a browser? It’s now possible thanks to API keys!

Features

API Keys

If you want to allow access to a Micro’s private routes you can now enable the api_keys preset for Micros in your Spacefile:

micros:
- name: api
src: ./api/
engine: python3.9
presets:
api_keys: true

If enabled, users of your app will be able to generate API keys in their app’s settings and use them to make authenticated requests to otherwise private routes of a Micro.

Here are some cool use cases that are now possible:

  • Connect to your app from a browser extension
  • Call an API route of your app from an external program
  • Let two Space apps talk to each other

If you want to add API keys to your Space app, make sure to update your space CLI with space version upgrade.

Learn more about API keys and how to use them in the docs.

API keys are just the beginning, we have lots of other features around interoperability and access control planned for the future. Stay tuned!

Thanks for being a crucial part in the early stages of Space and for all the great feedback we have received!