How Do You Use the Cockpit API with a Mobile App?

I could use a little help clarifying one or two best practices for fetching content from a headless CMS and using it in a native mobile app.

Every API call requires an API token, so a mobile app will have to have one.

Do you create one user, say mobileApp, and include the API token in the mobile app’s source code to be shared by every installation of the mobile app? Is it reasonable to assume that the user and token can be valid for a long time, or do they change frequently enough that some other method of getting/storing authentication is needed?


This is all up to you. Either you create a user and user and use the user token or create a custom token in the settings. it is mainly up to you how you implement it.

tokens will stay until yo regenerate them manually.