Hi everyone
Im new using outsystems i want to build mobile apps and intergrated with external auth that have been made,First i want to ask about how to store json to my entitiy, i share my testing oml and anyone can figure it out the error in the logic i made. in the future stored token will be used to verify every function that is called
Best Regards,
Yansen
I have updated the logic in accordance with the API call; please check and let me know if you find any issues.
Hi,
If you would also share the error you qet in your question, people might even be able to answer your question without opening the oml you shared.
Regards,
Daniel
Hi Mr Daniel
thanks for your response, i try to store the response from rest api to extended user entitiy, can u help me with the logic i made? because the rest api not stored
You have called REST API in logic which is returning single token rather than List.
You don't need to loop it as single token getting. Also you are looping blank structure rather than actual API response. simply you can set CreateExtendUser action with post API response token and delete token looping logic.
Good Luck!
Hi yosua,
It would be preferable if you shared the response of your API (since you are calling the local API) so that we could get a sense of the JSON.
hi mr mayank
thank you for your response, this is the respone from API
{
"data": {
"token": "2613ce838b58d8c86b0737058d9cef37430568a479929149e1ca1bb4b3878c7a"
}
i need store this json, and use it for verify every function
Hi ,
Thank you for providing the JSON response.
I updated the OML to meet the requirement and attempted to create a workable solution to give you some ideas. Change it to suit your needs.
NOTE - I used a hardcoded API response; modify it to call the API.
Hi mr @Mayank Dharmpurikar
thank you for help, it was workable, so i need to modify the variable using hardcode to call API ?
Yes, I added a comment to the action flow as well.
can i just doing call API and assign like this ?
Yes you can do this.
sorry to bother you, why still failed to deserialize it ? something wrong with the logic ?
No Problem Yosua,
In the assign statement directly assign the complete response of your API.
APIRespoonseInJSON = PostLogin.Response
already try using this before but some error show up " Invalid Data Type
'Text' data type required instead of 'PostLoginResponse'."
its worked, thanks you mr @Mayank Dharmpurikar , so we dont need to deserialize the jason right
Yes, correct.