Token in header, REST REQUEST, any given format?

Hi,

i want to make a REST.REQUEST but the API requires a authorization token in the header with the api version, which in normal Code would look something like this:

headers: {
“accept”: “application/json; v=1.0; text/html”,
“Authorization” : Bearer + token.
}

how does the format for this look like in the header in Streamsheets?

This is how i currently write it into the Header:

“accept: application/json; v=1.0, authorization: Bearer CJ9.eyJDYW5SZWFkIjoiIiwiQ2FuRXhlY3V0ZSI6IiIsImwOTc5OCwiaXNzIjoibG9jYWxob3N0IiwiYXVkIjoibG9jYWxob3N0In0.QofCpSfZ81ahJEPkUxu8PFU6Jcdn7VJK-tEIul0DW-0”

1 Like

Hi,

The REST.REQUEST header usage works like this:

image

Use the Range over these 4 cells in the Header input field.
The function wizard will automatically interpret your Range within a JSON() function.
This way the Data Range is transformed to a JSON.

Tip:
If you need to create JSON Ranges with a hierarchy use the “right click” option “Create JSON-Range”
on your sheet. You will be able to use TAB and Shift TAB to structure your message.

1 Like

it worked :star_struck::star_struck: i get the following message in the data field:

  • options.uri must be a path when using options.baseUrl

can you post the whole Rest.Request?

I suspect, that you may not have entered the right URL. :slight_smile:


i hope this helps you understand me, thanks a lot for the help! :muscle::+1::slightly_smiling_face:

Is it possible, that there is something entered in your Connector. In the base URL?
This would be added to your URL and make it useless :exploding_head: :wink:

2 Likes

yes, i had some information in the connetor, i deleted it and i finally have datastreming from my REST.REQUEST! :star_struck::star_struck::star_struck::grin: thanks a lot for the help! :confetti_ball::tada::balloon::sparkles:

1 Like