The following documentation is applicable to Free, Developer, and Developer Pro plans. For documentation related to the enterprise plan, please click here.

JWT

Refer this document to get API Key and Secret.

JWT Token by Email

Use this API to get JWT token by access token by email

Endpoint

POST https://cloud-api.loginradius.com/sso/jwt/api/login

Query Parameters

NameTypeDescription
apikeyStringLoginRadius API Key [REQUIRED]
jwtappStringJWT App Name [Required]
verificationurlStringVerification URL
loginurlStringLogin URL
emailtemplateStringEmail template Name

Body Parameters

NameTypeDescription
emailStringUser’s registered email address [REQUIRED]
passwordStringUser’s password[REQUIRED]

API Error Codes

Find common API error codes and their description.

Try Me Out

Click the button below to enter parameters, send a request and see the response.

This is sample API code:

  • Ruby
require 'uri'
require 'net/http'
url = URI('https://cloud-api.loginradius.com/sso/jwt/api/login?apikey=&jwtapp=&verificationurl=&loginurl=&emailtemplate=')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = false
request = Net::HTTP::Post.new(url)
request.body = "{\n  \"email\": \"\",\n  \"password\": \"\"\n}"
request['content-Type'] = 'application/json'
response = http.request(request)
puts response.read_body
  • Shell
wget --quiet \
    --method POST \
    --header 'content-Type: application/json' \
    --body-data "{\n  \"email\": \"\",\n  \"password\": \"\"\n}" \
    --output-document \
    - 'https://cloud-api.loginradius.com/sso/jwt/api/login?apikey=&jwtapp=&verificationurl=&loginurl=&emailtemplate='
  • Python
import requests

url = "https://cloud-api.loginradius.com/sso/jwt/api/login"
querystring = {"apikey":"","jwtapp":"","verificationurl":"","loginurl":"","emailtemplate":""}
payload = "{\n  \"email\": \"\",\n  \"password\": \"\"\n}"
headers = {
    'content-Type': 'application/json',
}
response = requests.request("POST", url, data=payload, headers=headers, params=querystring)
print(response.text)
  • Javascript
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://cloud-api.loginradius.com/sso/jwt/api/login?apikey=&jwtapp=&verificationurl=&loginurl=&emailtemplate=",
    "method": "POST",
    "headers": {
"content-Type" : "application/json",
},
    "data": "{\n  \"email\": \"\",\n  \"password\": \"\"\n}"
}
$.ajax(settings).done(function (response) {
    console.log(response);
});

This is sample request body code :

{
  "apikey": "********-****-****-*****************",
  "jwtapp": "dev-dummy-app",
  "access_token": "********-****-****-*****************",
  
}

This is what response sample code looks like:

{
   "signature": "vZ2lucmFkaXVzLmNvbSIsImlhdCI6MTUxMTkyOTgyNy**********NTExOTI5ODI3LCJleHAiOjE1MTE5"
}

JWT Token by Phone

Use this API to get JWT token by access token by Phone

Endpoint

POST https://cloud-api.loginradius.com/sso/jwt/api/login

Query Parameters

NameTypeDescription
apikeyStringLoginRadius API Key [REQUIRED]
jwtappStringJWT App Name [Required]
verificationurlStringVerification URL
loginurlStringLogin URL
emailtemplateStringEmail template Name

Body Parameters

NameTypeDescription
phoneStringUser’s registered phone number [REQUIRED]
passwordStringUser’s password[REQUIRED]

API Error Codes

Find common API error codes and their description.

Try Me Out

Click the button below to enter parameters, send a request and see the response.

This is sample API code:

  • Ruby
require 'uri'
require 'net/http'
url = URI('https://cloud-api.loginradius.com/sso/jwt/api/login?apikey=&jwtapp=&verificationurl=&loginurl=&emailtemplate=')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = false
request = Net::HTTP::Post.new(url)
request.body = "{\n  \"phone\": \"\",\n  \"password\": \"\"\n}"
request['content-Type'] = 'application/json'
response = http.request(request)
puts response.read_body
  • Python
import requests

url = "https://cloud-api.loginradius.com/sso/jwt/api/login"
querystring = {"apikey":"","jwtapp":"","verificationurl":"","loginurl":"","emailtemplate":""}
payload = "{\n  \"phone\": \"\",\n  \"password\": \"\"\n}"
headers = {
    'content-Type': 'application/json',
}
response = requests.request("POST", url, data=payload, headers=headers, params=querystring)
print(response.text)
  • Shell
wget --quiet \
    --method POST \
    --header 'content-Type: application/json' \
    --body-data "{\n  \"phone\": \"\",\n  \"password\": \"\"\n}" \
    --output-document \
    - 'https://cloud-api.loginradius.com/sso/jwt/api/login?apikey=&jwtapp=&verificationurl=&loginurl=&emailtemplate='
  • Javascript
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://cloud-api.loginradius.com/sso/jwt/api/login?apikey=&jwtapp=&verificationurl=&loginurl=&emailtemplate=",
    "method": "POST",
    "headers": {
"content-Type" : "application/json",
},
    "data": "{\n  \"phone\": \"\",\n  \"password\": \"\"\n}"
}
$.ajax(settings).done(function (response) {
    console.log(response);
});

This is sample request code:

 {
    "apikey": "********-****-****-*****************",
    "jwtapp": "<app name>",
    "verificationurl": "<verification-url>",
    "loginurl": "<login url>",
    "emailtemplate": "<template name>"
  }
  

This is what response sample code looks like:

{
    "signature": "vZ2lucmFkaXVzLmNvbSIsImlhdCI6MTUxMTkyOTgyNy**********NTExOTI5ODI3LCJleHAiOjE1MTE5"
}

JWT Token

Use this API to get JWT token by access token.

Endpoint

GET https://cloud-api.loginradius.com/sso/jwt/api/token

Query Parameters

NameTypeDefaultDescription
apikeyStringnoneLoginRadius API Key [REQUIRED]
access_tokenStringnoneToken generated from a successful oauth from social platform [REQUIRED]
jwtappStringnoneJWT App Name [Required]

API Error Codes

Find common API error codes and their description.

Try Me Out

Click the button below to enter parameters, send a request and see the response.

This is sample API code:

  • Ruby
require 'uri'
require 'net/http'
url = URI('https://cloud-api.loginradius.com/sso/jwt/api/token?apikey=&jwtapp=&access_token=')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = false
request = Net::HTTP::Get.new(url)
request['content-Type'] = 'application/x-www-form-urlencoded'
response = http.request(request)
puts response.read_body
  • Python
import requests

url = "https://cloud-api.loginradius.com/sso/jwt/api/token"
querystring = {"apikey":"","jwtapp":""}
headers = {
    'content-Type': 'application/x-www-form-urlencoded',
}
response = requests.request("GET", url, headers=headers, params=querystring)
print(response.text)
  • Shell
wget --quiet \
    --method GET \
    --header 'content-Type: application/x-www-form-urlencoded' \
    --output-document \
    - 'https://cloud-api.loginradius.com/sso/jwt/api/token?apikey=&jwtapp=&access_token='
  • Javascript
var settings = {
    "async": true,
    "crossDomain": true,
    "url": "https://cloud-api.loginradius.com/sso/jwt/api/token?apikey=&jwtapp=&access_token=",
    "method": "GET",
    "headers": {
"content-Type" : "application/x-www-form-urlencoded",
},
}
$.ajax(settings).done(function (response) {
    console.log(response);
});

This is sample request body code :

{
    "apikey": "********-****-****-*****************",
    "jwtapp": "dev-dummy-app",
    "access_token": "********-****-****-*****************",
    
}

The following displays the sample response body code:

{
    "signature": "vZ2lucmFkaXVzLmNvbSIsImlhdCI6MTUxMTkyOTgyNy**********NTExOTI5ODI3LCJleHAiOjE1MTE5"
}

Go Back to Home Page


Was this article helpful?

Have more questions? Submit a request