Fix links

This commit is contained in:
braginini
2023-05-23 20:09:00 +02:00
parent 8d3ca83eb0
commit f8b79ddcd8
13 changed files with 56 additions and 55 deletions

View File

@@ -3,7 +3,7 @@ export const description =
# Authentication
You'll need to authenticate your requests to access any of the endpoints in the NetBird API. In this guide, we'll look at how authentication works. Netbird offers two ways to authenticate your API requests: OAuth2 and personal access tokens (PAT). {{ className: 'lead' }}
You'll need to authenticate your requests to access any of the endpoints in the NetBird API. In this guide, we'll look at how authentication works. NetBird offers two ways to authenticate your API requests: OAuth2 and personal access tokens (PAT). {{ className: 'lead' }}
## OAuth2 with bearer token
@@ -18,7 +18,7 @@ Always keep your token safe and reset it if you suspect it has been compromised.
## Using personal access tokens
When establishing a connection using [PATs](/docs/how-to/access-netbird-public-api), you will need your access token — you can create one in the [Netbird dashboard](https://app.netbird.io/users) under User settings. It is recommended to use [service users](/docs/how-to/access-netbird-public-api) for all organization wide flows calling the API. Here's how to add the token to the request header using cURL:
When establishing a connection using [PATs](/docs/how-to/access-netbird-public-api), you will need your access token — you can create one in the [NetBird dashboard](https://app.netbird.io/users) under User settings. It is recommended to use [service users](/docs/how-to/access-netbird-public-api) for all organization wide flows calling the API. Here's how to add the token to the request header using cURL:
```bash {{ title: 'Example request with personal access token' }}
curl https://api.netbird.io/api/users \

View File

@@ -12,7 +12,7 @@ For this guide, we'll be using cURL to make our first API request. If you don't
## Get an access token
Before making your first API request, you need to create an access token to authenticate requests to the API. You can create an access token in the [Netbird dashboard](https://app.netbird.io) under [Users » Me](https://app.netbird.io/users).
Before making your first API request, you need to create an access token to authenticate requests to the API. You can create an access token in the [NetBird dashboard](https://app.netbird.io) under [Users » Me](https://app.netbird.io/users).
After the token was created successfully make sure to store it as we need it for the next step.
## Making your first API request
@@ -31,7 +31,7 @@ curl -X GET https://api.netbird.io/api/peers \
<div className="not-prose">
<Button
href="/peers"
href="/api/resources/peers"
variant="text"
arrow="right"
children="Read the docs for the peers endpoint"
@@ -43,6 +43,6 @@ curl -X GET https://api.netbird.io/api/peers \
Great, you're now set up with an API client and have made your first request to the API. Here are a few links that might be handy as you venture further into the NetBird API:
- [Read how to properly authenticate against the NetBird API](/authentication)
- [Check out the users endpoint](/users)
- [Learn about the different error types](/errors)
- [Read how to properly authenticate against the NetBird API](/api/guides/authentication)
- [Check out the users endpoint](/api/resources/users)
- [Learn about the different error types](/api/guides/errors)

View File

@@ -9,13 +9,13 @@ export const description =
Use the NetBird Public API to manage users, peers, network rules and more from inside your application or scripts to automate the setup of your mesh network. {{ className: 'lead' }}
<div className="not-prose mb-16 mt-6 flex gap-3">
<Button href="/ipa/guides/quickstart" arrow="right" children="Quickstart" />
<Button href="/api/guides/quickstart" arrow="right" children="Quickstart" />
</div>
## Getting started {{ anchor: false }}
To get started, it is recommended to create a [service user](/docs/how-to/use-service-users-with-access-token#service-users), that can later be used to communicate with the NetBird API.
To be able to send requests to our API you need to [authenticate](/ipa/guides/authentication) on each request. This can be done either by Bearer token from your identity provider or by creating a [personal access token](/ipa/guides/authentication#using-personal-access-tokens) in the NetBird dashboard.{{ className: 'lead' }}
To be able to send requests to our API you need to [authenticate](/api/guides/authentication) on each request. This can be done either by Bearer token from your identity provider or by creating a [personal access token](/api/guides/authentication#using-personal-access-tokens) in the NetBird dashboard.{{ className: 'lead' }}
<div className="not-prose">
<Button