AnsweredAssumed Answered

curl syntax with authorization bearer

Question asked by bkaisin on Oct 16, 2018
Latest reply on Oct 17, 2018 by skywillmott

Hello,

 

With a FM17 file.

 

I am trying to recover a file from a remote server via an API and thus an "Insert From url".

 

First I get a token with an "Insert From url" script step and I put it in a $token variable, it works.

The next line of my script I have a new "Insert from url" where I make a get (curl) to retrieve the file.

He always sends me "Authentication failed"

 

The curl code is probably the problem, and probably a syntax problem.

 

"-X GET

 

-H \"Cache-Control: no-cache\"

-H \"Content-Type: application/json\"

-H \"Authorization: Bearer \" @$token

 

Does someone has an idea?

 

Thank

Outcomes