- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 09:01 AM
how to add authorization token to header in rest message script, I'm using the below one and its not working. Please assist.
a.setRequestHeader('authorization', 'Bearer'+token);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 02:38 PM
Hi, testing quickly in a PDI it looks like white space is needed after 'Bearer'
IE a.setRequestHeader('authorization', 'Bearer '+token);
Otherwise, where does your token value come from? If retrieving from a password2 type encrypted field then you would need to decrypt the value before using.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-19-2022 02:38 PM
Hi, testing quickly in a PDI it looks like white space is needed after 'Bearer'
IE a.setRequestHeader('authorization', 'Bearer '+token);
Otherwise, where does your token value come from? If retrieving from a password2 type encrypted field then you would need to decrypt the value before using.