Exchange a one-time code for the real API key
POST
/v1/cli-auth/exchange
const url = 'https://api.extport.dev/api/v1/cli-auth/exchange';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.extport.dev/api/v1/cli-auth/exchange \ --header 'Content-Type: application/json' \ --data '{ "code": "example" }'No auth — the code itself is the credential, single-use and short-lived.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
code
required
string
Examplegenerated
{ "code": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
key
required
string
Examplegenerated
{ "key": "example"}