Google Sheet function pull access_token in API

hannd2412

New Member
Joined
Dec 16, 2021
Messages
3
Office Version
  1. 2013
Platform
  1. Windows
Hello guys,

I have a job that has to do with Google Sheets and would love to get your support in the MrExcel community

I have a sheet like this.
I would like to ask you to help me create a Google Sheet function located in the column Access_Token_from_API_URL to get the value of Access_Token in the link located in the column API_URL.
It is the cluster of characters that are bolded below
{"r":0,"msg":"Success","data":{"access_token":"eyJjdHkiOiJzdHJpbmdlZS1hcGk7dj0xIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJqdGkiOiJTS0dvSkxlWkZuRHhYZjRtd0U3cUllYjJTa3dFRE5ZYy0xNjM5NjU5MzA3IiwiaXNzIjoiU0tHb0pMZVpGbkR4WGY0bXdFN3FJZWIyU2t3RUROWWMiLCJleHAiOjE2Mzk3NDU3MDcsInVzZXJJZCI6IjA5MTk5OTk5OTk5IiwiY2FuQ2FsbG91dCI6ZmFsc2V9.d6CnwcmHDI1MOOaBsrTHm6P1-YZUizY_PLh0kyNRSL4"}}

Thank you for reading and helping me. Wishing you all a merry and peaceful Christmas!
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Welcome to the MrExcel Message Board!

Cross-posting (posting the same question in more than one forum) is not against our rules, but the method of doing so is covered by #13 of the Forum Rules.

Be sure to follow & read the link at the end of the rule too!

Cross posted at: I really need a Google Sheet function pull access_token in API
If you have posted the question at more places, please provide links to those as well.

If you do cross-post in the future and also provide links, then there shouldn’t be a problem.
 
Upvote 0
Hi, try this.
Code:
=index(split(index(split(index(split(importxml("https://icc-api.stringee.com/v1/buttoncall/accesstoken?key=UmZzaXN1d2tXejVDYTVxWGQ1M2pZUE9FcWtsWGtRdy9JWFRPTS9lZXhtVG9CaDY5UXE3L1pZUnplcWt0T09zMw==&username=09199999999","//*"),"|"),2,1),":"),1,5),""""),1,1)
 
Upvote 0
Hi, try this.
Code:
=index(split(index(split(index(split(importxml("https://icc-api.stringee.com/v1/buttoncall/accesstoken?key=UmZzaXN1d2tXejVDYTVxWGQ1M2pZUE9FcWtsWGtRdy9JWFRPTS9lZXhtVG9CaDY5UXE3L1pZUnplcWt0T09zMw==&username=09199999999","//*"),"|"),2,1),":"),1,5),""""),1,1)
Thank you for responding.
I applied your sample code to 500 links, the cell only returns Loading
 

Attachments

  • loading.png
    loading.png
    13.5 KB · Views: 10
Upvote 0

Forum statistics

Threads
1,216,137
Messages
6,129,097
Members
449,486
Latest member
malcolmlyle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top