Authentication
The Authentication API allows users to authenticate themselves to gain access to additional functionalities within the system. This section details how to use the Login API and other authentication options.
Endpoint Information
- Endpoint:
https://api.repoflow.io/auth/login
- Method: POST
- Content-Type:
application/json
Login API
Request Data
The request must include the following data in JSON format:
username
: The user's username.password
: The user's password.
Example Request
A typical request to the Login API might include the user's username and password as follows:
{
"username": "username",
"password": "yourpassword"
}
Using Personal Access Tokens
Personal Access Tokens (PATs) can be created from the RepoFlow website under Account Settings and used in two ways:
1. Bearer Token
You can use the personal access token as a bearer token in the Authorization
header of your requests.
-
Header:
Authorization: Bearer <personal-access-token>
-
Example Request:
curl -H "Authorization: Bearer <personal-access-token>" https://api.repoflow.io/endpoint
2. Basic Authentication
You can use the personal access token as the password in Basic Authentication. When doing so, the username should be set to "token"
.
-
Header:
Authorization: Basic <base64("token:<personal-access-token>")>
-
Example Request:
curl -u "token:<personal-access-token>" https://api.repoflow.io/endpoint