Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Im making an API call to silverpop(using tRest component) to obtain the access token, passing the client id,client secret and refresh token. I'm getting a JSON response in the below format
{"access_token":"xxxxxxxxxxxx","token_type":"bearer","refresh_token":"xxxxxxxxx","expires_in":11169}
I want to be able to be able to save these in a delimited file and assign the access token to a context variable so that I can pass its value in the next API call.
Please give me a detailed explanation as this topic totally confuses me.
Thanks in advance for any input that you may be able to give me
oh 🙂
sorry!
of course, you haven't it, because it is tExtractJSONFields - https://help.talend.com/reader/wDRBNUuxk629sNcI0dNYaA/fXKGrpQJBOMvM4G9ckjE7A
link response to tParseJSONFields tExtractJSONFields, than connect to tFlowToIterate
generally, that's all - tFlowToIterate already store values into global variables, you could use these variables anywhere in following connected subjobs
Hi @vapukov,
Thanks for your reply. But I don't have 'tParseJSONFields' component.I just have tFileInputJSON and tWriteJSONField components. May be because I'm using the trial license?
Please let me know of an alternate way to handle this. Thanks in advance
oh 🙂
sorry!
of course, you haven't it, because it is tExtractJSONFields - https://help.talend.com/reader/wDRBNUuxk629sNcI0dNYaA/fXKGrpQJBOMvM4G9ckjE7A
Hi @vapukov,
Thanks for your reply.. Can you also please show me how it is done with tExtractJSONField component?
I tried doing it but was not able to as the JSON response is passed as a single string through the Body field of tRest component and I'm not able to separate the different fields.
This is my JSON response
{"access_token":"xxxxxxx","token_type":"bearer","refresh_token":"xxxxxxxxx”,”expires_in”:14399}
And I want to be able to save these in a delimited file as key value pairs and assign the access token to a context variable.
Hi @vapukov,
I was finally able to get what I wanted with tExtractJSONField component.
Thanks much for your timely response!!