---
# System prepended metadata

title: Prelogin Technical Spesification

---

## Flutter Auto Login Technical Specification

**Summary**
- This document describes how to auto login with current access token from Flutter to External Application.

**AutoLogin Steps**
1. Consume PreLogin Endpoint and Get Redirect Url
2. Navigate Redirect Url (Open in webview maybe)


**Consume PreLogin Endpoint and Get Redirect Url**

- PreLogin request is defined below
```javascript!
POST https://{environment}-pubagw6.burgan.com.tr/ebanking/token/CreatePreLogin
-H Authorization: "Bearer {current_token}"
{
    clientCode:"Target Application Client Id",
    scopeUser:"Scope User For Target Application"
}
```
- Success Response
```json!
Status Code : 200 
{
    redirectUri : "https://test-pubagw6.burgan.com.tr/ebanking/token/prelogin/consume/5824d7c3-c20e-41f4-ba2c-345113539acd"
}
```


- Error Responses
```json!
Status Code : 404 
{
    "status": 404,
    "detail": "Client Not Found",
    "errorCode": 404
}
```
```json!
Status Code : 404 
{
    "status": 404,
    "detail": "Target Client Not Found",
    "errorCode": 404
}
```
```json!
Status Code : 403 
{
    "status": 403,
    "detail": "Client is not authorized to use this flow",
    "errorCode": 403
}
```
```json!
Status Code : 403 
{
    "status": 403,
    "detail": "Target client is not authorized to creating login url from given source client",
    "errorCode": 403
}
```


