02-14-2022 14:11
02-14-2022 14:11
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.
02-14-2022 14:12
02-14-2022 14:12
I actually posted this on the wrong board. It should be in the WebAPI board. I'm sorry.
02-14-2022 14:31
02-14-2022 14:31
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.