Provider implementation I need help

Hello

I need help to determine how to do the next things.

I have API call which generate/regenerate API access token for user.
So the question looks like: how I should implement this, as resource or datasource? It’s something like one time resource… What to do if some regenerate this token from UI?

I should generate this token and use later for configure our environment.
How I can pass this token to other modules, over environment variables I can’t, only one what I found it is write this token to the .tf.var file or something like this.