Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

98
Views
JWT Authentication, Encoding a LocationToken

I'm working an external API in which there is a locationToken. With this, I use it to create encoded data which I will use within my Bearer.

I am creating the data as such:

var data = {
  "locationToken": postman.getEnvironmentVariable("LocationToken"),
  "timestamp": Math.floor(new Date().getTime() / 1000)
};


data = addIAT(data);

With this data, i'm then encoding it using stringify then Cyrpto:

var stringifiedData = CryptoJS.enc.Utf8.parse(JSON.stringify(data));
var encodedData = base64url(stringifiedData);

postman.setEnvironmentVariable("locationTokenData", encodedData);

Strangely, within this it will always come out as, please note the NhdGlvblRva

eyJsb2NhdGlvblRva2VuIjoiZXlKMGVYQWlPaUpLV ----- etc

However, if I run it through their automatic documentation sample it comes with:

eyJpYXQiOjE2NjE2OTQyNzksInRpbWVzdGFtcCI ------ etc

I can confirm it is linked to the same account, same area, same details etc, however there appears to be an issue with how i'm passing this data. Can anyone let me know what's incorrect? Why is this string always occuring: NhdGlvblRva

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!