AnsweredAssumed Answered

Base64 Encoding

Question asked by twelvetens on Jan 11, 2017
Latest reply on Jan 12, 2017 by fmpdude

Hi,

 

Wonder if anyone can help with this.

 

I'm working on using the Magento REST API to do some sync'ing with filemaker.

 

The API uses OAuth, and as part of the OAuth process, I have to generate a Base64 encoded string from a hex string.

 

If I use the Filemaker Function:

Base64Encode ("B6 79 C0 AF 18 F4 E9 C5 87 AB 8E 20 0A CD 4E 48 A9 3F 8C B6")

I get a result of:

QjYgNzkgQzAgQUYgMTggRjQgRTkgQzUgODcgQUIgOEUgMjAgMEEgQ0QgNEUgNDggQTkgM0YgOEMgQjY=

Which is the same result that I get with this third party testing website:

Free Online HTML Formatter - FreeFormatter.com

 

BUT - the Base64 encoded value above is not being accepted by the API, and when I look at this documentation on how to generate the Base64 encoded value, (scroll to the bottom) - the Base64 encoded value is very different to the one above, and works, which the above (generated) value doesn't:

Creating a signature — Twitter Developers

Base64 encoded result: tnnArxj06cWHq44gCs1OSKk/jLY=

 

So what's going on here? Base64 encoding is a standard, right? How can I get a Base64 encoded string that's different to the one provided in teh example Twitter API doco, and why doesn't mine work?

 

I've tried the Filemaker built in Base64Encode function, and the BaseElements one, they all provide the same value, but it doesn't appear to work. What am I missing?

Outcomes