Overview of the API Login Process

Login/Connection to the Customer API 
Refer to the swagger open API page for examples using the link below. https://customer.jetnetconnect.com/swagger/index.html

Sample programs/code are available from the following Github link. https://github.com/jetnet-llc/jtcTestClient

Authentication & Access

Endpoint: POST https://customer.jetnetconnect.com/api/Admin/APILogin

Input:

{
  "email": "user@example.com",
  "password": "password123"
}

Output:

{
  "bearerToken": "eyJhbGciOi...",
  "apiToken": "abc123"
}

Best Practices:

  • Store API tokens securely.

  • Track expiration and refresh as needed.

Curl Code

Below is some example “curl” code for making an initial login connect to obtain the bearer token and application token (apitoken).

curl -X 'POST' \ 'https://customer.jetnetconnect.com/api/Admin/APILogin' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "emailAddress": "demo@jetnet.com", "password": "g846ii2v" }' 

API Login Response

{ "bearerToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE2NzQ3NzU1MTAsImlzcyI6Imh0dHBzOi8vamV0bmV0Y29ubmVjdC5jb20vIiwiYXVkIjoiaHR0cHM6Ly9qZXRuZXRjb25uZWN0LmNvbS8ifQ.TlReaIlUJIWZ3nuKZ_Cn7rUV9dVDjzqRMDps3_6KZ5k", "apiToken": "T0FGUy00ODU3MTE5MS0zYzJjLTQ4ZTUtYmVkOC1jYmUzZjZiNmEzNWI=" } 

Bearer Token: API Login

The Bearer Token is used in the request header to authenticate the call to the API C# sample code shown below:

client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", bearerToken); 

client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("*/*")); 

client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); 

 

 

Was this article helpful?

/