Recently we are experiencing a surge in support tickets where the customer says their new purchase code is not working. While trying to activate the theme license message appears as “Blocked”.
When we verified the authenticity of the purchase code using envato api we found the code to not be working. We crosschecked the same with a few of our older purchase codes and they were found working.
How can this be fixed? any suggestions
Can you open your browser’s developer tools to the “network” tab and try that first one again? I’d love to see what status code that request has, and if there is any message in the response.
A reminder that purchase codes must be in a UUID format (such as
a67f4582-95d6-4019-81f3-75d1ebe3a071) and that any whitespace before or after the code (such as spaces or tabs) can cause the request to fail. Make sure to trim any such whitespace before querying the API.
hey thanks for your response. We made sure we didn’t enter any white spaces, we tried again at the envato platform: https://build.envato.com/api/#market_0_getAuthorSale
However, we aren’t getting any response, we checked there is no whitespace before and after purchase code.
Can you try checking for a status code under the headers tab? The console might also have more details. The request failed for a specific reason, we just need to know what the error is.
Hi, we are getting a “CORS error” status in the response.
The code you’re entering is not in the correct format. You made a good effort to censor the purchase codes, which is a smart move, but I’m able to prove this through your network logs:
Notice the difference between the valid request and the blocked request. The browser is encoding special characters in the failed request.
%80, these are Unicode characters and will be blocked by the API.
On some fonts, they will look like regular letters, but they truly are not the same. See how the developer tools font renders them after decoding:
I’m not sure how the purchase code ended up like this? If a buyer is copying and pasting it directly from Envato, then this should be impossible, and I’ve never seen or heard of any case like this before.
Consider retyping the purchase code from scratch using only ASCII characters.
hello @baileyherbert thanks for helping, we got the solution. We were earlier copy-pasting the purchase code from the text document. When we tried typing it manually and it worked
thanks again for your help.
You’re welcome! After some further investigation, the character in question is actually a ligature, so whatever software you used seems to have converted the ASCII “ff” into this special character.
It’s not very normal for software to automatically convert ASCII text into ligatures like this. Generally, it’s provided as an option and disabled by default. I would double check the settings for that program and be aware of this in the future.
Hello @baileyherbert ,
We encountered the same issue with a new purchase code, i already tried it multiple times typing manually.
It’s hard to say without seeing the purchase code. However, the issue will fundamentally be the same – this API endpoint is very strict about the format of the purchase code, and the slightest error will result in the request being blocked.
That includes cases where:
- There is a whitespace character before, after, or inside the code.
- The length of the code is not exactly 36 characters.
- The code contains characters other than 0-9, a-f, and hyphen (-)
The code must also be strictly in UUIDv4 format, which is 8 characters, three sets of 4 characters, and another 12 characters, all delimited by a hyphen. The third set of characters must begin with
If any of these segments are shorter or longer, or if that third segment doesn’t start with
4, then the code is not valid and the request will be blocked.
You can try pasting the purchase code onto this website to confirm that it is a valid v4 UUID: UUID / GUID Validator Online – if the result is “not valid” or shows a version other than 4, it’s not a real purchase code.
Thanks for the UUID validator, the issue is now resolved.