Chilkat Online Tools

Node.js / DocuSign Admin API / 03 Refresh Access 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.declaration()
   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 "Authorization: Basic {{encodedKeys}}"
	--data-urlencode 'refresh_token={{refreshToken}}'
	--data-urlencode 'grant_type=refresh_token'
https://{{hostenv}}/oauth/token

Postman Collection Item JSON

{
  "name": "03 Refresh Access Token",
  "event": [
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          "var jsonData = JSON.parse(responseBody);",
          "postman.setEnvironmentVariable(\"accessToken\", jsonData.access_token);",
          "var jsonData = JSON.parse(responseBody);",
          "postman.setEnvironmentVariable(\"refreshToken\", jsonData.refresh_token);"
        ]
      }
    }
  ],
  "request": {
    "method": "POST",
    "header": [
      {
        "key": "Authorization",
        "value": "Basic {{encodedKeys}}"
      }
    ],
    "body": {
      "mode": "urlencoded",
      "urlencoded": [
        {
          "key": "refresh_token",
          "value": "{{refreshToken}}"
        },
        {
          "key": "grant_type",
          "value": "refresh_token"
        }
      ]
    },
    "url": {
      "raw": "https://{{hostenv}}/oauth/token",
      "protocol": "https",
      "host": [
        "{{hostenv}}"
      ],
      "path": [
        "oauth",
        "token"
      ]
    }
  },
  "response": [
  ]
}