Hi Community, 

 

I have to use Odata of Creatio environment from Postman using OAuth 2.0 authentication. For that, I have followed a Tech hour session of Creatio Trainers.

Tech Hour - Integrate like a boss with Creatio, part 2 (Odata)

 

But, while generating token at 38:10, I am not getting token in a response instead of that I am getting some HTML code like below.

 

 

Please suggest and help how to get token and if I am missing something. :)

Thanks in Advance.

Like 0

Like

4 comments

Hi Patrik,

 

Can you please provide a complete HTML-code from the response? There should be some description of the response at the bottom.

 

Best regards,

Oscar

Hi Oscar,

 

Below is the complete HTML-code.

 

<!DOCTYPE html

    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" culture="en-US">

 

<head>

    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />

    <meta name="fontiran.com:license" content="LAXSN" />

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <title>

        Creatio

    </title>

    <style>

        .font-preload {

            position: absolute;

            opacity: 0;

        }

 

        .font-preload-open-sans {

            font-family: "Bpmonline Open Sans";

        }

 

        .font-preload-open-sans-light {

            font-family: "Bpmonline Open Sans Light";

        }

 

        .font-preload-open-sans-bold {

            font-family: "Bpmonline Open Sans Bold";

        }

    </style>

    <script type="text/javascript">

        Terrasoft = window.Terrasoft || {};

Terrasoft.appFramework = "NETFRAMEWORK";

Terrasoft.coreVersion = "7.18.5.1500";

Terrasoft.useClientPerformanceLogger = false;

Terrasoft.configuration = Terrasoft.configuration || {};

Terrasoft.configuration.Structures = Terrasoft.configuration.Structures || {};

Terrasoft.useParallelSchemaBuilding = true;

Terrasoft.showSessionEndNotification = false;

Terrasoft.useWebSocketKeepAlive = true;

Terrasoft.useStaticFileContent = true;

Terrasoft.usePackageFileContent = true;

Terrasoft.useGenerateModulePathes = true;

Terrasoft.useNewRightsManagement = true;

Terrasoft.useOffsetFetchPaging = false;

Terrasoft.useMarkerValue = true;

Terrasoft.enablePerformanceManager = false;

Terrasoft.useSecureSettingsOnClient = false;

Terrasoft.useSchemaUniqueNameRandomGenerator = true;

Terrasoft.disableAspxErrorPage = true;

Terrasoft.useAsyncStaticContentGeneration = true;

var FileAPI = {

    staticPath: "https://050800-studio.creatio.com//Resources/ui/FileAPI/",

    flashUrl: "https://050800-studio.creatio.com//Resources/ui/FileAPI/FileAPI.flash.s…",

    flashImageUrl: "https://050800-studio.creatio.com//Resources/ui/FileAPI/FileAPI.flash.i…" };

Terrasoft.storesConfig = [];

Terrasoft.storesConfig.push({levelName: 'ClientPageSession', type: 'Terrasoft.MemoryStore', isCache: true});

Terrasoft.storesConfig.push({levelName: 'Domain', type: 'Terrasoft.LocalStore', isCache: true});

if(Terrasoft.StoreManager){

    Terrasoft.StoreManager.registerStores(Terrasoft.storesConfig);

}

Terrasoft.loaderBaseUrl = "https://050800-studio.creatio.com/";

Terrasoft.workspaceBaseUrl = "https://050800-studio.creatio.com/";

Terrasoft.coreModulesPath = 'core/hash/';Terrasoft.app = Terrasoft.app || {};

Terrasoft.app.config = Terrasoft.app.config || {};

Terrasoft.app.config.staticFileContent = Terrasoft.app.config.staticFileContent || {};

Terrasoft.app.config.staticFileContent.imagesRuntimePath = 'conf/content/img';

Terrasoft.app.config.staticFileContent.schemasRuntimePath = 'conf/content';

Terrasoft.app.config.staticFileContent.resourcesRuntimePath = 'conf/content/resources';



 

Terrasoft.showSelfRegistrationLink = true;

    </script>

    <script type="text/javascript">

        window.workspaceCount = 0;

window.supportInfo = [];

window.supportInfoCaption = 'Technical support';

window.importantLinks = [];

window.importantLinksCaption = 'Important links';

window.productVersion = '7.18.5.1500';

window.loginTimeout = '30000';

var Terrasoft = Terrasoft || {};

window.isNtlmLoginVisible = false;

window.isOpenIdLoginVisible = false;

window.loginPageWidgetInfo = {visible: true, src: 'https://www.bpmonline.com/page/creatio/widget'}

window.unsupportedBrowserInfo = { visible: true }

window.loginImageUrl = '/terrasoft.axd?s=nui-binary-syssetting&r=LogoImage&source_hash=98b1b8112110361c36b8ab70d88db296';

window.productVersion = '7.18.5.1500';

    </script>

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core-sl/851526dc5db90435038b708f7ad9…"></script>

    <script type="text/javascript">

        Terrasoft.loginUrl = 'https://050800-studio.creatio.com/ServiceModel/AuthService.svc/Login';

Terrasoft.ntlmLoginUrl = 'https://050800-studio.creatio.com/Login/NuiLogin.aspx?ntlmlogin';

Terrasoft.changePasswordUrl = 'https://050800-studio.creatio.com/ServiceModel/AuthService.svc/DoChange…';

Terrasoft.simpleLoginTag = "simplelogin";

Terrasoft.loginModulePath = 'https://050800-studio.creatio.com//core/cab68cf981c5c57700bb51729bd6695…';

    </script>

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core/db7fe0930e6258f01fb73405039cc9a…">

    </script>

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core/a2de79ad7a40d8fc81723c5ec4924f6…">

    </script>

    <script type="text/javascript">

        Terrasoft.configurationContentHash = "e5c44fb36af042b9bd061eabf982e95f";

Terrasoft.fileContentDescriptorsFileExists = true;

Terrasoft.fileContentBootstrapsFileExists = true;

Terrasoft.currentUserCultureName = "en-US";

    </script>

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core/82582be2ea4244b8799f21ef78fd6a7…">

    </script>

    <link rel="stylesheet" type="text/css"

        href="https://050800-studio.creatio.com//core/618184e4bd438f8c5e43aa74aff1464…" />

    <link href="../terrasoft.axd?s=nui-binary-syssetting&r=FaviconImage&source_hash=b05a750c6b433c4fc47050e3d539139e"

        rel="shortcut icon" type="image/vnd.microsoft.icon" />

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core/057665f97324038f6c7c326b6734de6…"></script>

    <script type="text/javascript">

        requirejs.config({

    'paths': {

        'require-config': 'https://050800-studio.creatio.com//core/c3b382519da9b15e207de6d13b5f07b…',

        'require-url-config': 'https://050800-studio.creatio.com//core/967b00f40245f346c0fb1e09d597be5…',

        'core-base': 'https://050800-studio.creatio.com//core/d17ef52258a059bbfe965f70e14a892…',

        'bootstrap': 'https://050800-studio.creatio.com//core/6290cba0af7874034f1ec28936bca13…',

        'performanceLogger': 'https://050800-studio.creatio.com//core/cf23c4ee65b1c47840a78249f048d9e…',

        'performancecountermanager': 'https://050800-studio.creatio.com//core/e79de66acd39442acc1377a3c171086…',

        'rxjs': 'https://050800-studio.creatio.com//core/3af6aa89d5864381a3fd9f1fe6785da…',

        'process-designer-component': 'https://050800-studio.creatio.com//core/5119e9df4aca8914fabf4effd4b3ee4…',

        'voice-to-text-component': 'https://050800-studio.creatio.com//core/9df4cfbb9e9b64ef08efce6d7b673e3…',

        'jQuery': 'https://050800-studio.creatio.com//core/f7072c6fb890cf46ab0e415e1c5edc0…',

        'ckeditor-base': 'https://050800-studio.creatio.com//core/35294e09797b9d02519ddb8ec253cc6…',

        'html2canvas': 'https://050800-studio.creatio.com//core/6bd482f253bafa6d551a21a9d1c5158…',

        'login-view-utils': 'https://050800-studio.creatio.com//core/dac89c851a756ef023c909a162fe1bd…',

        'configuration-loader': 'https://050800-studio.creatio.com//core/2a08fc37afe007049254c67723a07b7…',

        'configuration-bootstraps': 'https://050800-studio.creatio.com//core/0b716942a363fd530c825a6916ea3eb…',

        'loadbootstrap': 'https://050800-studio.creatio.com//core/fb69c3378bd3bdd1dcaab52942c87fa…',

        'chartjs': 'https://050800-studio.creatio.com//core/35da68cdf95e9468e2d8a3402ba2990…',

        'chartjs-label': 'https://050800-studio.creatio.com//core/0465154f993989d21ccc58b60b5eff8…',

        'chartjs-defaults': 'https://050800-studio.creatio.com//core/f5dcdb1296b21c01cb66773578fcdbd…',

        'chartjs-funnel': 'https://050800-studio.creatio.com//core/1d50b71dc2141b3e6bf11233f3110a0…',

        'chartjs-gauge': 'https://050800-studio.creatio.com//core/c69beeddee9d58074a185ac35ead686…',

        'user-agent': 'https://050800-studio.creatio.com//core/7b46df63a446479bad7a010aefae6d4…',

        'user-agent-parser': 'https://050800-studio.creatio.com//core/796eff62f0f726654cfc29d4a77df33…',

        'ng-core': 'https://050800-studio.creatio.com//core/6cb28d63fbb28f9a3377feea3f9d820…',

        'ng-loader': 'https://050800-studio.creatio.com//core/6eada957e17a6e76a7090421502adbb…',

        'ng-scripts': 'https://050800-studio.creatio.com//core/30950c16db19b349981dd6cd0b66a3b…',

        'ng-polyfills-es5': 'https://050800-studio.creatio.com//core/83382b3fa36e6adf19d56492fa6ed49…',

        'ng-polyfill-webcomp': 'https://050800-studio.creatio.com//core/ba560325babea1d1f73bcc2b076e626…',

        'numeral': 'https://050800-studio.creatio.com//core/b3ac42fc2efdd8256803f41aab70211…',

        '@creatio/sdk': 'https://050800-studio.creatio.com//core/091860f68bd3d2e237f482f14c45829…'

    },

    'shim': {

        'chartjs-label': {

            'deps': [

                'chartjs'

            ]

        },

        'chartjs-defaults': {

            'deps': [

                'chartjs-label'

            ]

        },

        'chartjs-funnel': {

            'deps': [

                'chartjs'

            ]

        },

        'chartjs-gauge': {

            'deps': [

                'chartjs'

            ]

        },

        'user-agent': {

            'deps': [

                'user-agent-parser'

            ]

        },

        'ng-core': {

            'deps': [

                'ng-loader'

            ]

        },

        'ng-loader': {

            'deps': [

                'ng-scripts'

            ]

        },

        'ng-scripts': {

            'deps': [

                'ng-polyfills-es5',

                'ng-polyfill-webcomp'

            ]

        },

        'process-designer-component': {

            'deps': [

                'ng-core'

            ]

        },

        'voice-to-text-component': {

            'deps': [

                'ng-core'

            ]

        }

    }

});

require(['loadbootstrap'], function() {});

    </script>

    <script type="text/javascript"

        src="https://050800-studio.creatio.com//core/f7072c6fb890cf46ab0e415e1c5edc0…"></script>

    <script type="text/javascript">

        console.warn('Creatio Debug mode is OFF. To switch ON use following code');

console.log('Terrasoft.SysSettings.postPersonalSysSettingsValue("IsDebug", true)');

Terrasoft.isDebug = false;

    </script>

    <script type="text/javascript">

        Terrasoft.DataValueTypeRange = {INTEGER: {maxValue:2147483647,minValue:-2147483648},FLOAT: {maxValue:79228162514264337593543950335,minValue:-79228162514264337593543950335},DATE_TIME: {maxValue:"9999-12-31T23:59:59.999",minValue:"0001-01-01T00:00:00.000"}};

    </script>

    <script type="text/javascript">

        Terrasoft.isSspInReadonlyMode = false;

    </script>

    <script type="text/javascript">

        let authErrorExceptions = Terrasoft.AuthErrorExceptions = {};

authErrorExceptions[4] = 'Access denied. Contact your system administrator';

authErrorExceptions[5] = 'Your password has expired. Re-set your password';

authErrorExceptions[10] = 'Time zone is invalid.';

authErrorExceptions[0] = 'Authorization failed';

    </script>

</head>

 

<body>

    <div class="font-preload">

        <span class="font-preload-open-sans">_</span>

        <span class="font-preload-open-sans-light">_</span>

        <span class="font-preload-open-sans-bold">_</span>

    </div>

    <form name="IndexForm" method="post" action="./NuiLogin.aspx?ReturnUrl=%2fconnect%2ftoken" id="IndexForm">

        <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="eMuh9ihakhnX/zUqq7lTE6+Qjxg4SzesoxXF7ONcAMizlm2gDp+Gio00ugTgWm/AlwErvFthXa/vJl5/6RJTQJDAIj954pdUbX8rQ4ykxxFP9iqA" />

 

        <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="0BFA92C5" />

    </form>

</body>

 

</html>

Pratik Sanghani,

 

Thank you! This message is usually returned in case you are not authenticated. Did you use UserName and UserPassword as a ClientId and ClientSecret and used Basic Auth? And also are you passing a form-data grant_type key in the headers and also using the identity service URL as an endpoint to send request?

 

Best regards,

Oscar

Oscar Dylan,

 

Thank you for the Help. It is working fine for me as well. I was not using the identity service URL as an endpoint earlier. :)

Show all comments