UAPI Functions - ExternalAuthentication::get_authn_links

This function lists the external authentication links to the current cPanel account.


 cPanel or Webmail Session URL

https://hostname.example.com:2083/cpsess##########/execute/ExternalAuthentication/get_authn_links

 LiveAPI PHP Class

$cpanel new CPANEL(); // Connect to cPanel - only do this once.
  
// Lists the external authentication links to the current account.
$list_external_links $cpanel->uapi(
    'ExternalAuthentication''get_authn_links'
);

 LiveAPI Perl Module

my $cpliveapi = Cpanel::LiveAPI->new(); # Connect to cPanel - only do this once.
  
# lists the external authentication links to the current account.
my $list_external_links $cpliveapi->uapi(
    'ExternalAuthentication''get_authn_links'
);

 cPanel Template Toolkit

<!-- lists the external authentication links to the current account. -->
[% data = execute( 'ExternalAuthentication', 'get_authn_links' ); %]

 Command Line

uapi --user=username ExternalAuthentication get_authn_links

 

Notes:

  • You must URI-encode values.
  • username represents your account-level username.

 Output (JSON)

   "messages":null,
   "errors":null,
   "status":1,
   "metadata":{ 
 
   },
   "data":[ 
      
         "preferred_username":"username@gmail.com",
         "link_time":1443124604,
         "subject_unique_identifier":"123456789012345678901",
         "provider_protocol":"openid_connect",
         "provider_id":"google"
      },
      
         "preferred_username":"username@gmail.com",
         "link_time":1443124604,
         "subject_unique_identifier":"123456789012345678901",
         "provider_protocol":"openid_connect",
         "provider_id":"google"
      }
   ]
}

 

Note:

Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.

 

This function does not accept parameters.

Return

Type

Description

Possible Values

Example

preferred_username

string

 The preferred username of the account on the identity provider. 

A valid string.

username@gmail.com

link_time

integer

When the user linked their account to the identity provider.

 A valid integer in Unix time. 

1443124604

 subject_unique_identifier 

 integer 

The unique identifier for the user at the identity provider.

A valid integer.

 123456789012345678901 

provider_protocol

string

The identity provider's protocol.

A valid string.

openid_connect

provider_id

string

The system's unique key for the identity provider.

A valid string.

google

 

  • 5 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....