> For the complete documentation index, see [llms.txt](https://docs.iyzico.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.iyzico.com/urunler/paypos-app2app/app2app-entegrasyonu/session-olusturma.md).

# Session Oluşturma

Bu servis mobil oturum anahtarı kullanan servisler için gerekli Session Key’i üretir. Bu servise\
sadece sabit IP’si Paynet tarafında kayıtlı Müşteri Sunucusu tarafından header’da bayi için özel\
oluşturulmuş olan secret\_key ile istek gönderilebilir.

## Authorize – get\_auth\_key

> Mobil oturum anahtarı (session\_key) üretir.\
> Sadece Paynet tarafından IP tanımı yapılmış sunucular bu servisi çağırabilir.<br>

```json
{"openapi":"3.0.3","info":{"title":"PayPOS (Paynet) API","version":"1.0.0"},"tags":[{"name":"Authorize"}],"servers":[{"url":"https://api.paynet.com.tr","description":"Production"},{"url":"https://pts-api.paynet.com.tr","description":"Sandbox"}],"paths":{"/v1/agent/get_auth_key":{"post":{"summary":"Authorize – get_auth_key","description":"Mobil oturum anahtarı (session_key) üretir.\nSadece Paynet tarafından IP tanımı yapılmış sunucular bu servisi çağırabilir.\n","tags":["Authorize"],"parameters":[{"$ref":"#/components/parameters/AuthorizationHeader"},{"$ref":"#/components/parameters/PaynetMobileHeader"},{"$ref":"#/components/parameters/ContentTypeHeader"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthRequest"}}}},"responses":{"200":{"description":"Başarılı","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"400":{"description":"Hatalı istek","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"parameters":{"AuthorizationHeader":{"name":"Authorization","in":"header","required":true,"description":"Bayiye özel oluşturulmuş secret_key.","schema":{"type":"string"}},"PaynetMobileHeader":{"name":"PaynetMobile","in":"header","required":true,"description":"Mobil istek belirtir.","schema":{"type":"string"}},"ContentTypeHeader":{"name":"Content-Type","in":"header","required":true,"description":"İçerik tipi.","schema":{"type":"string"}}},"schemas":{"AuthRequest":{"type":"object","required":["agent_id","user_id"],"properties":{"agent_id":{"type":"string","description":"Bayi Id."},"user_id":{"type":"string","description":"Kullanıcı Id."}}},"AuthResponse":{"type":"object","properties":{"session_key":{"type":"string","description":"Mobil oturum anahtarı."},"expired_date":{"type":"string","description":"Geçerlilik tarihi."},"agent_id":{"type":"string","description":"Bayi Id."},"company_code":{"type":"string","description":"Ana firma Id."},"user_id":{"type":"string","description":"Kullanıcı Id."},"user_unique_id":{"type":"string","description":"Kullanıcı unique Id."},"is_okc_inquiry":{"type":"boolean","description":"ÖKC muafiyet sonucu."},"object_name":{"type":"string","description":"Obje türü."},"code":{"type":"integer","description":"Sonuç kodu."},"message":{"type":"string","description":"Sonuç mesajı."}}},"ErrorResponse":{"type":"object","properties":{"object_name":{"type":"string","description":"Obje türü."},"code":{"type":"integer","description":"Sonuç kodu."},"message":{"type":"string","description":"Sonuç mesajı."}}}}}}
```
