Authenticate User with OpenID Authentication

{ authenticateUserOPENID }

Generates a Pyramid access authentication token using OpenID authentication parameter map



  • API Section: /API2/auth
  • API Version: 2.0
  • From Release: 2020.20
  • Can be used by Non-admin accounts
  • Method operates via POST actions only.
  • Input Parameters






    The OpenID parameter map serialized to String representation

    Output Response

    Successful Result Code


    Description of Response Type

    The response is the security token as a base64 string. It is usually stored in a cookie.


    The security token is a string that needs to be embedded in every API call to ensure the API calls are authorized. If saved as a cookie in a web browser, it can be used (for the authenticated user) to auto-login into the application. The assumption is that the user has already authenticated via OpenID before attempting to authenticate into Pyramid.

    Authenticate User with OpenID:

    This example demonstrates how to authenticate a user using OpenID.

    // URL of the Pyramid installation and the path to the API 2.0 REST methods
    var pyramidURL = "";
    // The response from the OpenId authentication
    var openIdToken = "YOUR_OPEN_ID_TOKEN(RESPONSE)";
    //generic method for running REST methods
    function callApi(path, data, parseResult = true) {
    	var xhttp = new XMLHttpRequest();"POST", pyramidURL + path, false);
    	if (parseResult) {
    		return JSON.parse(xhttp.responseText);
    	} else {
    		return xhttp.responseText;
    //calling the API to receive the Pyramid token
    let pyramidToken = callApi(
    		data: {
    			parameterMap: {
    				id_token: openIdToken,
    				state: "preferred_username",
    console.log("fetch: " + pyramidToken);