Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

einsteinpp's avatar

Storing third party api auth token

Hello,

i'm working on an application that use TheTvDB api. I've to login with my api key and they return a classic jwt token.

What would be the best way to store this token for futur use ? I was thinking about caching it but it doesn't feel like cache is made for thing like that.

Any idea ?

0 likes
1 reply
tykus's avatar

Database typically for me in a settings or user_settings table having key (or name) and value columns.

But, cache can equally work.

Please or to participate in this conversation.