Chilkat Online Tools

VB6 / EPC 2.0 - Partner Sandbox - 19.4 November [External] / [Lender] Create Lender Authentication Token

Back to Collection Items

System.OutOfMemoryException: Insufficient memory to continue the execution of the program.
   at System.Runtime.InteropServices.Marshal.StringToHGlobalUni(String s)
   at Chilkat.CkMarshal.StringToX(String s, XString* x)
   at Chilkat.Xml.LoadXml(String xmlData)
   at ChilkatApi.XClass.LoadClass(String className, Log log)
   at ChilkatApi.ApiCache.getApiClass(String className, Log log)
   at ChilkatApi.ApiCache.getApiMethod(String className, String methodName, Log log)
   at ChilkatCode.CodeGen.getXEntry(String className, String entryName)
   at ChilkatCode.CodeGen.getEntryType(String varName, String entryName)
   at ChilkatCode.Parser.objectAccess(String varName, Xml xml)
   at ChilkatCode.Parser.varAccess(Xml xml)
   at ChilkatCode.Parser.primaryExpression(Xml xml)
   at ChilkatCode.Parser.unaryExpression(Xml xml)
   at ChilkatCode.Parser.multiplicativeExpression(Xml xml)
   at ChilkatCode.Parser.additiveExpression(Xml xml)
   at ChilkatCode.Parser.relationalExpression(Xml xml)
   at ChilkatCode.Parser.equalityExpression(Xml xml)
   at ChilkatCode.Parser.andExpression(Xml xml)
   at ChilkatCode.Parser.expression(Xml xml)
   at ChilkatCode.Parser.argList(Xml xml)
   at ChilkatCode.Parser.argList(Xml xml)
   at ChilkatCode.Parser.fnCall(Xml xml)
   at ChilkatCode.Parser.subCall()
   at ChilkatCode.Parser.statement()
   at ChilkatCode.Parser.Chilkat()
   at ChilkatCode.Parser.Parse()
   at ChilkatCode.Compile.CompileForToolsIO(String srcCode, String langHashKey, StringBuilder sbHtmlOut)

Curl Command

curl -X POST
	-H "Content-Type: application/x-www-form-urlencoded"
	--data-urlencode 'username={{encompass_username}}@encompass:{{encompass_instance_id}}'
	--data-urlencode 'password={{encompass_password}}'
	--data-urlencode 'grant_type=password'
	--data-urlencode 'client_id={{lender_client_id}}'
	--data-urlencode 'client_secret={{lender_client_secret}}'
	--data-urlencode 'scope=lp'
https://domain.com/

Postman Collection Item JSON

{
  "name": "[Lender] Create Lender Authentication Token",
  "event": [
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// Extract Lender oAuth token from response body",
          "var jsonData = JSON.parse(responseBody);",
          "var lenderToken = jsonData.access_token;",
          "",
          "// Set to an environment variable",
          "postman.setEnvironmentVariable(\"lender_token\", lenderToken);"
        ]
      }
    }
  ],
  "_postman_id": "dcaf78e5-430f-47e0-9d98-ef4313352ace",
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Content-Type",
        "name": "Content-Type",
        "value": "application/x-www-form-urlencoded",
        "type": "text"
      }
    ],
    "body": {
      "mode": "urlencoded",
      "urlencoded": [
        {
          "key": "username",
          "value": "{{encompass_username}}@encompass:{{encompass_instance_id}}",
          "type": "text"
        },
        {
          "key": "password",
          "value": "{{encompass_password}}",
          "type": "text"
        },
        {
          "key": "grant_type",
          "value": "password",
          "type": "text"
        },
        {
          "key": "client_id",
          "value": "{{lender_client_id}}",
          "type": "text"
        },
        {
          "key": "client_secret",
          "value": "{{lender_client_secret}}",
          "type": "text"
        },
        {
          "key": "scope",
          "value": "lp",
          "type": "text"
        }
      ]
    },
    "url": "{{api_host}}/oauth2/v1/token"
  },
  "response": [
  ]
}