Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Passing connection options for API authorization


I'm having trouble with passing a environment variable into an API component as a connection option. In the connection options I am using parameter and value pair as:

profilesettings: token=$(taboolaToken)

In a previous script python script component, I have prepared the environment variable and printed it to ensure its format looks good:

cursor = context.cursor()
cursor.execute('select access_token from taboola_auth_token')
token = cursor.fetchone()[0]
complete_token = 'Bearer '+ token
context.updateVariable('taboolaToken', str(complete_token))

Bearer abcTokenEtc

I thought that the environment variable $(taboolaToken) would be available in the RSD as:



<rsb:set attr="Header:Name#" value="Authorization" />
<rsb:set attr="Header:Value#" value="_connection.token"/>

However, I think the value is never passed as my API gets no results.

Any pointers would be gladly welcomed.



5 Community Answers

Matillion Agent  

Laura Malins —

Hi Greg

You’re referencing your variable incorrectly in the Connection Options. It should be ${taboolaToken}

You should also pass the connection option using the below syntax:

<rsb:set attr="Header:Name#" value="Authorization" /> <rsb:set attr="Header:Value#" value="[_connection.token]"/>


Greg Roper —


So the parameter name is:


and the value is simply:


How would I reference it in the RDS?


Many thanks,


Matillion Agent  

Kalyan Arangam —

Hi Greg,

RSD does not have access to matillion variables so you are required to pass the necessary values using the ProfileSettings connection-option.

Connection Option – profilesettings
Value – taboolatoken=$(taboolaToken)

In the RSD, you may reference it using [_connection.taboolatoken]

Please note that you may also use Other instead of profilesettings for the same. Other should be available in the drop-down. We have made changes to the documentation (late last week) in this regard. Please see the following link for updated example and relevant screenshots.

Hope that helps.


Greg Roper —

OK. Sorry didn't see the curly braces ${taboolaToken}.

Matillion Agent  

Kalyan Arangam —

Hi Greg,

I managed to make the same mistake :)

Looks like you got it working. I will close this ticket for now.


Post Your Community Answer

To add an answer please login