You can translate the question and the replies:

Passing Token present in Base View to Header in HTTP Datasource

Hello sir, I need to pass token present in one base view to http header. Can you help me with this as there are not much resources available on Internet reguarding this. I created Interpollation Variable in header section of json datasource but what next. How can I pass Token value present in my Base View to http header automatically. Any kind of help is appreciated. Thanks. I attached some of image links where I am facing issue. https://drive.google.com/file/d/146iu5inoQpqFX8gjdOAKrej-AWbTvL1B/view?usp=sharing Above link is for selection view from where I need to fetch Token https://drive.google.com/file/d/1JNis-WEB_3rTJ7mK76yHzZuqFRYseVm6/view?usp=sharing Above link is for JSON DataSource I created https://drive.google.com/file/d/1rXWMl4BNxWQBdXdamBp92-PQNWxgzyWy/view?usp=sharing Above link is for Header I am passing in this Datasource
user
25-03-2022 03:10:46 -0400
code

3 Answers

Hi, It is possible to pass the Bearer token value present in one base view dynamically to retrieve the required endpoint data by following the below steps: * You already have the base view with the "token" field which holds the Bearer Token value. Consider this as BV1 * Now, create a base view over the data source with interpolation variable defined. * While creating base view, this will ask you for the value of the Bearer token while creating the base view and you need to provide the pre-generated access token once for the schema to be built. * For now specify the bearer token value from the BV1 (Copy & Paste) and the new base view will be created. Consider this new base view as BV2. * Now, [create a joined view](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_derived_views/creating_join_views/creating_join_views) with BV1 and BV2. * Add a join between the ''token'' field of BV1 and mandatory input field "token" of BV2. Save the derived view. After this, everytime this join view is executed, first the token is obtained from BV1 and then passed dynamically to the desired API endpoint of BV2. For more information on interpolation, take a look at the [ Paths and Other Values with Interpolation Variables](https://community.denodo.com/docs/html/browse/8.0/en/vdp/administration/creating_data_sources_and_base_views/path_types_in_virtual_dataport/path_types_in_virtual_dataport#paths-and-other-values-with-interpolation-variables) section of the Virtual DataPort Administration Guide. Hope this helps!
Denodo Team
25-03-2022 08:59:04 -0400
code
Thanks for your reply sir. But I am not able to join token from base view b1 to b2 as I have interpolation variable in header. So what shall I do now? Thanks in Advance.
user
25-03-2022 09:03:22 -0400
Hi, As explained in the previous answer, when you create a base view from the data source with interpolation defined, the interpolation variable will become the **mandatory field** ("token") in the created base view. Then, you could join those views by specifying the join between the b1 and b2 base views. Additionally, if you still need assistance on passing the token from one base view to another and if you are a user with valid support access, you can create a support case in [Denodo Support Site](https://support.denodo.com/) so that our support team will assist you further.
Denodo Team
29-03-2022 07:27:29 -0400
code
You must sign in to add an answer. If you do not have an account, you can register here