I have no idea about wether they are legal to collect or not, but either way i would argue that it´s not your best choice. While many people have collected this genus and successfully kept them in captivity and is generally considered an easy genus to keep, this is nevertheless a wild animal. This means that adapting to captivity is always a process with certain risks. It may refuse certain foods, for example. Also, since it wasn´t collected with previous intention, you probably don´t have everything set-up to offer optimal conditions right away. I mean, you didn´t even know what it was, which makes it improbable that you are familiar with the specifics of the care and diet it needs.
And finally, given that you have the option of captive-bred animals, i personally consider it unethical to take an animal from the wild to satisfy what in the end is just a whim. If you are trully interested in this species i would advice you to research it thoroughly first, set everthing up, included food cultures if necessary and THEN look into acquiring healthy, already accostumed to captivity CB animals. That, in my view, is far more ideal.