Bearer authentication (also called token authentication) is an HTTP authentication scheme that involves security tokens called bearer tokens. The name "Bearer authentication" can be understood as "give access to the bearer of this token." The bearer token is a cryptic string, usually generated by the server in response to a login request. The client must send this token in the Authorization header when making requests to protected resources:
Header: Authorization Bearer <token>
<token>
can be created in your Settings, take a look at How to issue an API token.
Response Header
X-HackMD-API-Version: 1.0.0
With the access token you get, you can request to the "Me API Endpoint" https://api.hackmd.io/v1/me
to test if authentication works:
Now that you've successfully authenticated with the HackMD API, you're all set to explore the available endpoints.
We invite you to try our new interactive Swagger documentation, where you can discover all the functionalities, see detailed information about each endpoint, and even make live API calls directly from the browser. Give it a try and see what you can build!