# Extract token from JSON

**URL:** <https://community.thunkable.com/t/extract-token-from-json/2777288>\
**Category:** Questions about Thunkable X\
**Created:** [January 11, 2024, 10:08am UTC](https://community.thunkable.com/t/extract-token-from-json/2777288 "2024-01-11T10:08:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lodgical.lodgeb](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@lodgical.lodgeb](https://community.thunkable.com/u/lodgical.lodgeb)\
**Post date:** [January 11, 2024, 10:08am UTC](https://community.thunkable.com/t/extract-token-from-json/2777288/1 "2024-01-11T10:08:48Z")

</div>

Hi There, I am very new.

Could someone help me and show me the blocks required to pull just the token from this JSON please?

`{"response":{"token":"a4e916e6369336635fcae5e7671506364217d2735a931da035a7"},"messages":[{"code":"0","message":"OK"}]}`

So far, my attempts have either yielded “null” or [object Object]

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 11, 2024, 3:58pm UTC](https://community.thunkable.com/t/extract-token-from-json/2777288/2 "2024-01-11T15:58:01Z")

</div>

When you post JSON text on the forums, be sure to format it using the \</\> button in the toolbar above the message area. That allows you to copy & paste it into [Best JSON Viewer and JSON Beautifier Online](https://codebeautify.org/jsonviewer) without the smart quotes invaliding the JSON. I reformatted yours already.

You can get the property “response.token” from the object (the object is the green `response` block).

I have a tutorial that explains all of this in a video: [API JSON Tutorial (Video)](https://community.thunkable.com/t/api-json-tutorial-video/1140575)

---

<div class="post-metadata">

**Author:** ![lodgical.lodgeb](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@lodgical.lodgeb](https://community.thunkable.com/u/lodgical.lodgeb)\
**Post date:** [January 11, 2024, 10:10pm UTC](https://community.thunkable.com/t/extract-token-from-json/2777288/3 "2024-01-11T22:10:39Z")

</div>

Thank you. I will try to remember your advice going forward re using the \</\> button.

I have watched your video before posting and didn’t have any luck. I have have spent hours on this , I wouldn’t go straight to a forum without trying to work things out for myself. Unfortunately, my client is looking for a solution and has asked me to explore a number of no/low code builders and similar products in order to build a field service app. After trying other products and much research the choice has been shortlisted to Thunkable and a product called iAuditor. I am pushing for Thunkable as I have heard good things about it and I think it will offer much more flexibility going forward. However, if I cannot demonstrate a simple mvp that includes api after several hours use I fear my client will push to use iAuditor. Hence the request for someone to hopefully help me with an answer rather than the suggestion to watch a tutorial. Please take no offence to that , it is not intended in a bad way, I am simply under a tight deadline and need help rather than tuition. I do appreciate the “teach a man to fish” approach usually though and will have to become a lot more familiar if the client should choose to use Thunkable.

I’m not 100% sure what you meant by using response.token. I have just tried this and it is returning "null

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/7/9/798fb9fd7f0102df6b23387791bfbf3268563bf8.png)

---

<div class="post-metadata">

**Author:** ![lodgical.lodgeb](https://avatars.discourse-cdn.com/v4/letter/l/a4c791/32.png) [@lodgical.lodgeb](https://community.thunkable.com/u/lodgical.lodgeb)\
**Post date:** [January 12, 2024, 12:37am UTC](https://community.thunkable.com/t/extract-token-from-json/2777288/4 "2024-01-12T00:37:40Z")

</div>

Okay, put in a late night session, bit of trial and error. Here’s the blocks that gave me just the token property I was looking for - in case it is helpful to anyone else in the future.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/3/434f7307da2b285cc03ef8c5c0a2b9222aee35d9.png)

Thank you Tatiang for your input, I wouldn’t have tried response.token if left to my own devices.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [January 12, 2024, 1:50am UTC](https://community.thunkable.com/t/extract-token-from-json/2777288/5 "2024-01-12T01:50:43Z")

</div>

You’re welcome. Keep in mind that if you need more help than users like me can provide or are under a deadline, you do have the option of contacting support (provided you have a Pro license or better) or hiring someone to assist you.

I’m glad you got that part working.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [April 11, 2024, 1:51am UTC](https://community.thunkable.com/t/extract-token-from-json/2777288/6 "2024-04-11T01:51:22Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
