# Aptible database credentials: direct, endpoint, and tunnel credentials are different things

## TL;DR

Use tunnel credentials only inside the tunnel session; they expire when it closes or after 24 hours. For app connectivity use direct access or a database endpoint with its own credentials. Never paste tunnel credentials into long-lived config; they will stop working.

Use this when you run into the situation in the title.

**When not to use this skill:** unrelated tasks. It covers only the procedure above.

## Compatibility

The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.

## Details

Context: Official docs (Aptible database credentials): documents three access paths with different credentials: direct access via network integrations with aptible db:url, database endpoint credentials created per endpoint, and database tunnel credentials that only last while the tunnel is up (max 24 hours).
