# Minor success! (A Webviewer and Web API and OAuth2 story)

**URL:** <https://community.thunkable.com/t/minor-success-a-webviewer-and-web-api-and-oauth2-story/1201232>\
**Category:** Questions about Thunkable X\
**Created:** [April 1, 2021, 7:15pm UTC](https://community.thunkable.com/t/minor-success-a-webviewer-and-web-api-and-oauth2-story/1201232 "2021-04-01T19:15:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [April 1, 2021, 7:15pm UTC](https://community.thunkable.com/t/minor-success-a-webviewer-and-web-api-and-oauth2-story/1201232/1 "2021-04-01T19:15:14Z")

</div>

I did it. It took too many hours of fighting, thanks to bad and conflicting documentation (mostly on the API side) and a good measure of clueless newbieness, but I did it.

I’ve got an app working that runs through the entire OAuth2 process for my local grocery store’s API. It gets an authorization code using the Webviewer (with a redirect to a page with some javascript that sends back the authorization code as a Webviewer message, using this thing: [GitHub - thunkable/webviewer-extension: Communicate between the Thunkable Web Viewer and a website](https://github.com/thunkable/webviewer-extension/) ), then it switches to WebAPI to get get an access token and refresh token with that authorization code.

But oh man, that debugging. Every single attempt, I had to redo my log in on the grocery store’s website (since I couldn’t yet get the authorization token that would have let me skip it). If I ever log in manually to the grocery store’s website again manually, it’ll be too soon.

Next goal: Put something in my shopping cart! 🙂

---

<div class="post-metadata">

**Author:** ![catsarisky](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/catsarisky/32/100661_2.png) [@catsarisky](https://community.thunkable.com/u/catsarisky)\
**Post date:** [April 1, 2021, 9:05pm UTC](https://community.thunkable.com/t/minor-success-a-webviewer-and-web-api-and-oauth2-story/1201232/2 "2021-04-01T21:05:44Z")

</div>

Never before have I been so excited to see the wrong brand of eggs appear in my cart. 😉

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [April 1, 2021, 9:22pm UTC](https://community.thunkable.com/t/minor-success-a-webviewer-and-web-api-and-oauth2-story/1201232/3 "2021-04-01T21:22:01Z")

</div>

Nevertheless you got eggs 👏

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [April 1, 2021, 10:17pm UTC](https://community.thunkable.com/t/minor-success-a-webviewer-and-web-api-and-oauth2-story/1201232/4 "2021-04-01T22:17:25Z")

</div>

> [@catsarisky](#):
>
> I’ve got an app working that runs through the entire OAuth2 process for my local grocery store’s API

Wow - that sounds awesome!

> [@catsarisky](#):
>
> thanks to bad and conflicting documentation (mostly on the API side)

If any of it is on our side please let us know as we’re revamping our documentation at the moment!

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:25pm UTC](https://community.thunkable.com/t/minor-success-a-webviewer-and-web-api-and-oauth2-story/1201232/5 "2024-11-08T13:25:36Z")

</div>


