POST

/User/Login

Usage Notes

When

  • Authenticate with username and password
  • Obtain initial access and refresh tokens

Requirements

  • Username and Password in request body

Notes

  • Returns accessToken (short-lived) and refreshToken (longer-lived)
  • Include accessToken in Authorization header for all other endpoints
  • No existing authentication required

Description

Authenticates credentials and returns JWT access and refresh tokens. Use accessToken for API requests.

Required Headers

No Authorization Header Required - This endpoint is publicly accessible without authentication.

HeaderValueDescription
Content-Typeapplication/jsonRequest content type
Version2.0API version identifier

Request Body

Parameter Type Required Description
username >
string(255)
Your 7G API username.
password >
string(255)
Your 7G API password.
username
string(255)
Your 7G API username.
password
string(255)
Your 7G API password.

Security Best Practices

  • Always use HTTPS to encrypt credentials during transmission
  • Store credentials securely using environment variables or secure vaults
  • Implement proper error handling to avoid credential exposure in logs
  • Monitor failed authentication attempts for security threats
  • Use refresh tokens to minimize access token lifetime exposure

Example Requests

bash
curl -X POST 'https://api.7g.com.au/User/Login' \
  -H 'Version: 2.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "username": "api_user",
    "password": "secure_password_123"
  }'

Response Examples

json
{
  "accessToken": "eyJxxCJ9.eyJxxxpYyJ9.8Csxx3S-jMxxnv-4Nxxfw",
  "refreshToken": "cZkxxx4Y="
}