I have script and will share once will find it on my system and allowed to share the standalone implementation. Let me know if you will not be able to achieve it still i will share
i guess @Susana you can share that example script shared. i hope you remember
Well after hitting the Authenticate api you will receive an authorization access token and that will be valid for 60 minutes.( previous 2016.2 api version info but guess will be same)
then you have to pass the token in header with following manner
Authorization: Bearer xxxxxxxxxxx
Authorization is a name attribute in Header Section
and Bearer xxxxxxxxxxxx is the value in header section
xxxxxxxxxxx - represents the access token.
then you will not get the above error.