{"_id":"577385ea8c48e00e005037fd","version":{"_id":"54eb63b859b1172100334fae","project":"54eb50e5615ffc1900305a16","forked_from":"54eb63a1867e1917009b711d","__v":28,"createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf","592e7685c58275000f20174f","59392839e376d4002f8a0474","59393064e376d4002f8a05a1","5947ae0d4005e2000f3a4fec","594a74df1d1de5001ab3517a","5954bc387a147f001b918915","59b8eeeb707542001076d3b6"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"editedParams":true,"parentDoc":null,"category":{"_id":"56d8147c3eb4dd0b00201aac","project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","__v":0,"pages":[],"sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-03-03T10:39:56.158Z","from_sync":false,"order":20,"slug":"settings","title":"Settings"},"project":"54eb50e5615ffc1900305a16","__v":1,"editedParams2":true,"user":"54eb4fdedf7add210007b29b","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-06-29T08:25:14.251Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"POST /auth/1/session HTTP/1.1\nHost: api.infobip.com\nContent-Type: application/json\nCache-Control: no-cache\n\n{\n    \"username\": \"username\",\n    \"password\": \"password\"\n}","language":"json"}]},"method":"post","results":{"codes":[{"code":"{\n  \"token\": \"2f9b4d31-2d0d-49a8-85f0-9b862bdca394\"\n}","language":"json","status":200,"name":""}]},"settings":"","auth":"never","params":[{"_id":"577387fe8c48e00e0050380c","ref":"","in":"body","required":true,"desc":"Your Infobip username","default":"","type":"string","name":"username"},{"_id":"577387fe8c48e00e0050380b","ref":"","in":"body","required":true,"desc":"Your infobip password","default":"","type":"string","name":"password"}],"url":"/auth/1/session"},"isReference":true,"order":5,"body":"|Parameter|Type|Description|\n|-|-|-|\n|*token*|String|Use this token for authentication. Token expires after one hour of inactivity.|\n\n[block:api-header]\n{\n  \"type\": \"post\",\n  \"title\": \"Send SMS example\"\n}\n[/block]\nThis example shows how to use token for authentication with simple SMS example.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /sms/1/text HTTP/1.1\\nHost: api.infobip.com\\nContent-Type: application/json\\nAuthorization: IBSSO 2f9b4d31-2d0d-49a8-85f0-9b862bdca394\\nCache-Control: no-cache\\n\\n{\\n    \\\"text\\\": \\\"Simple SMS message\\\",\\n    \\\"from\\\": \\\"INFOSMS\\\",\\n    \\\"to\\\": \\\"41793026727\\\"\\n}\",\n      \"language\": \"json\"\n    }\n  ]\n}\n[/block]","excerpt":"The login process consists of creating a session using Infobip username and password. Upon successful session creation the API will return a session token. The token can be used for authenticating all subsequent API calls. If the token is not used for more then an hour it expires and a new session needs to be created.","slug":"session-login","type":"endpoint","title":"Session: Login"}

postSession: Login

The login process consists of creating a session using Infobip username and password. Upon successful session creation the API will return a session token. The token can be used for authenticating all subsequent API calls. If the token is not used for more then an hour it expires and a new session needs to be created.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

username:
required
string
Your Infobip username
password:
required
string
Your infobip password

Examples


Result Format


Documentation

|Parameter|Type|Description| |-|-|-| |*token*|String|Use this token for authentication. Token expires after one hour of inactivity.| [block:api-header] { "type": "post", "title": "Send SMS example" } [/block] This example shows how to use token for authentication with simple SMS example. [block:code] { "codes": [ { "code": "POST /sms/1/text HTTP/1.1\nHost: api.infobip.com\nContent-Type: application/json\nAuthorization: IBSSO 2f9b4d31-2d0d-49a8-85f0-9b862bdca394\nCache-Control: no-cache\n\n{\n \"text\": \"Simple SMS message\",\n \"from\": \"INFOSMS\",\n \"to\": \"41793026727\"\n}", "language": "json" } ] } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}