How do I create uvmap in order to apply texture to bezier curve
Curve objects create their own UV map.  These are polar-ish coords, where the V axis describes something roughly like angle from the curve and the U axis describes length along the curve.  While export functions have their own individual rules, any export function is likely to export a curve object as a bunch of mesh verts, edges, faces with the same UV as is used by Blender.  To access this UV in Blender, just make use a texture coordinate node and use the UV output.
If you want to edit this UV, it's necessary to convert the curve object to a mesh object, which can be done with a &quot;convert to&quot;-&gt; mesh operation (alt c in object mode for me.)
For cases of export, where I don't know of any engine that's going to use Blender's curve objects, there's really no reason not to convert to mesh.  Your export functions are just going to be converting the curves to mesh in the end anyways.