Skip to main content
Nintex Community Menu Bar

I’ve got the following json response:
{"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IkExRUQxNDU5MDM3QUMxOEVDRDIwQjMxNjAzRDQwRUE0NjU3MTU3N0JSUzI1NiIsInR5cCI6ImF0K2p3dCIsIng1dCI6Im9lMFVXUU42d1k3TklMTVdBOVFPcEdWeFYzcyJ9.eyJuYmYiOjE2Nz","expires_in":86400,"token_type":"Bearer","scope":"test-scope"}

 

In Nintex workflow I want to filter out the value of the ‘access_token’ key. Can someone provide me the regex for this? 

Hi @Bob_S 

 

This is using Workflow O365 but I believe it should work for you.

String: <Your source JSON>

REPLACE Operation

Pattern: ({"access_token":")(.*)(","ex)(.*})

Replacement String: $2

Output: <Your output variable>

 

Result Output (using Log to History)

 

Hope that helps


Hi Bob, have you found a solution for this? I also just got the same task of extracting an access_token from json on Nintex for SharePoint on prem.


Yeah my problem got solved. Are you facing the exact same issue? Or do you need to extract from a different json?


My json is in a different order but the content is (nearly) the same.


Look at the solution given above, that worked for me! Or send an example of your json so I can take a look at it.


My json looks like this (access_token shortened for readability):

{"token_type":"Bearer","expires_in":3599,"ext_expires_in":3599,"access_token":"I6Il9BM2d5bE.eyJhdMMjLTW0_QDjv-7eTK0-uC3hb-JcCMBCag"}


Can you put in this:


Pattern: ({*.)(.*)("access_token":")(.*)(.*"})

Replacement string: $4 


Thank you, Bob. This works for me.

Reply