[Solved] Injecting Cookies to Web Component - How to use Web Component with Cookies

My Requirement:
I want to login user into website with webviewer and get data from api with Web component
Problem I am facing:
When I am calling data with Web Component
The api is returning: “User need to be logged in”

So I wanted to call API data with Cookies

1 Like

please check that API documentation how to get data programmatically
Taifun

@Taifun Please consider full post

You can try with @vknow360 Custom Web View extension with block to Get Cookies from url

Yes he can.
But there is no method to inject cookies in web component.(I don’t know much about headers and setters)
A workaround can be this(using webview):

  • login to website
  • request data
  • get data using js
1 Like

@vknow360 Please explain how to get data using JS

I don’t know much about JS so Google has helped me in this :wink:
document.body.innerHTML returns the inner html content which we see on a webpage.

Here is the result I got using it:

My blocks:

image

2 Likes

Can some one help me to set cookies into Web component
I request @ExtensionDevelopers to make a simple extension like this
blocks (11)

blocks (12)
:pray:

It has been already added in v8 of Custom Web View.

2 Likes

I am asking it for Web Component

This component of extension don’t help you ??
coo

But how can I send those cookies to web component

With web component you can’t do that !!
Need used Custom Web View extension or Web View Tools extension

You can hide the web view and get the cookies and do that you need to do

How can I perform functions like Web Component
with this WebViewTools extension

Why not search first ?
And next you try it !!!
If don’t work or have issue post the question here !!!

Got solution for injecting cookies to Web Component


Special Thanks to @jarlissonlira2 for giving solution
Getting Cookies from CustomWebView (Extension made by @vknow360)
I am so Happy
:slightly_smiling_face:

3 Likes

Where it is ? :cry:

In CustomWebView Extension’s blocks

1 Like

No Version 8 is not released

1 Like

Yes version 8 is not released
he may have typed wrong number
Get and Set cookies blocks are available now