API Call: Token Refresh and Variable troubles in App State

Database & APIs

Hi everyone !

I've created 2 API calls:

A first one (called AccesToken) to retrieve a token thanks to the authentication code I retrieved earlier.

A second API call (named RefreshToken) to generate refresh tokens. The first refresh token I use is retrieved from the first AccesToken API request.

The problem is that when I re-test my API call, the refresh token changes and the request no longer works.

I've read that it should be added to a variable, especially in App State, but when I create a variable in App State, I can't find it in my Api Calls => Define Api Call => Body => Parameters => Value Source => Select Variable.

I'm only offered Create Variable.

Do you know how to proceed so that the refresh token is stored in a variable, and so that in the parameters of my API call I can tell it to use the newly found refresh token?

I've done a lot of research, but I don't understand why I don't see the created variables or how to use them.

Thanks in advance to anyone who can help me! Have a nice day!

What have you tried so far?

Chat GPT

Doc FlutterFLow

Did you check FlutterFlow's Documentation for this topic?
Yes
1
4 replies