# 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ı."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.iyzico.com/urunler/paypos-app2app/app2app-entegrasyonu/session-olusturma.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
