Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Character encoding for code challenge

I've been trying to figure out what type of character encoding is used for the Oauth. I can't seem to figure it out.
In the example on https://dev.fitbit.com/build/reference/web-api/developer-guide/authorization/
You start with base64UrlEncode(sha256Hash(01234567890123456789012345678901234567890123456789)) 

and end with -4cf-Mzo_qg9-uq0F4QwWhRh4AjcAqNx7SbYVsdmyQM

When I preform the same action as this with utf-8 I get a totally different string(ZmI4NzFmZjhjY2U4ZmVhODNkZmFlYWI0MTc4NDMwNWExNDYxZTAwOGRjMDJhMzcxZWQyNmQ4NTZjNzY2YzkwMw). I just can't seem to find the encoding it is probably somewhere in the documentation, but I can't find it.

Best Answer
2 REPLIES 2

I actually posted this on the wrong board. It should be in the WebAPI board. I'm sorry.

Best Answer
0 Votes

We can close this now I just figured it out. I was converting the sha256 back into a character set instead of sending the raw bytes into be encoded.

Best Answer