Full definition of Auth Token

Continuing the discussion from Auth token length:

I would like to be able to have my sketch deal with storing, retrieving and manipulating an Auth Token in a “future proof” way, so that at most recompiling the sketch would be all that is required for a length change or other changes. As such, it would be helpful to know the exact definition and restrictions of an Auth Token.

  • If the size increases in the future, is there a maximum length specified, which could be used to reserve a sufficient fixed-size storage area without danger of overflow? Is there a #define for this maximum?

  • Is there a #define available to obtain the current length in use, for allocating space at compile time? For example: char [AUTH_TOKEN_LENGTH + 1];

  • Is there a function or other method available to dynamically determine the current length in use during program execution?

  • Is the Auth Token, when passed to Blynk functions, represented as a string that must be NULL terminated, or is the array a fixed length with a terminator optional?

  • It currently appears to be a large binary number (presently 128 bits) represented as a character string of hexadecimal digits.

    • Will this always be the case (meaning it could be parsed and packed down into binary for storage)? If so, will there always be an even number of digits representing 8 bit bytes, or could there be an odd number of digits representing 4 bit nybbles?
    • Otherwise if other characters are allowed, is there any restriction on their values, such as printable ASCII only? (Obviously, if the string is NULL terminated then an embedded NULL wouldn’t be allowed).

If you want the details for my particular case at this time:

I’m planning to use an ESP8266 and have WiFiManager provide a custom parameter for setting the Auth Token. As such, I need to know the length of the field for entry and what my options are for parsing, storing and retrieving the entered value.

If the Auth Token’s length or other aspects of it change in the future, I want my sketch to continue to still allow setting the new Auth Token format though WIFIMangager, or at most only require the sketch to be blindly re-compiled and uploaded without any editing of the source.

Hello. At the moment there is no plans for token change. I think you don’t have to worry here. Especially with new release that will be published soon that should fully replace Wi-Fi manager with fancy Blynk UX :slight_smile:.

2 Likes

@Dmitriy, Thanks for the quick response.

In this case I think I’ll just implement a simple, standard hard-coded connection interface for now, then wait and see what this upcoming Blynk UX is all about. :neutral_face:

1 Like

Sounds like a plan :wink:.

Where can I to learn about Blynk UX?