App Session
POST
/api/auth/app/session
const url = 'http://localhost:8000/api/auth/app/session';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"code":"example","code_verifier":"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 http://localhost:8000/api/auth/app/session \ --header 'Content-Type: application/json' \ --data '{ "code": "example", "code_verifier": "example" }'Sign in a native app with the code from its login redirect.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
AppSession
object
code
required
Code
string
code_verifier
required
Code Verifier
string
Example generated
{ "code": "example", "code_verifier": "example"}Responses
Section titled “Responses”Successful Response
Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}