{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"46a42be2-1dd9-463f-90ce-8013256f617d","name":"Travellink API – SSO - Documentation","description":"SSO  \nDeveloper collections  \nQuestions and suggestions: [<u>api.travellink@wooba.com.br</u>](null) .\n\n**What is SSO? | How does single sign-on work?**\n\nSingle Sign-On (SSO) is an important cloud security technology that reduces all user application logins to one login for added security and convenience.\n\n**What is Single Sign-On (SSO)?**\n\nSingle sign-on (SSO) is a technology that combines the login pages of multiple different applications into a single page. With SSO, the user needs to enter his login credentials (username, password etc.) only one time on a single page to access all of his SaaS applications.\n\n# **To perform the initial settings, it is necessary to follow these steps:**\n\nTo perform the initial settings, it is necessary to follow these steps:\n\n### **Step 1**\n\nThe developer must inform the Licensee/Operator of the URL Redirect.\n\n### Step 2\n\nThe Licensee/Operator will access the Acess Portal:  \n[<u>https://operadorateste.com.br/AccessPortal/</u>](null)\n\nContent **Travellink API > Credential**\\> Select:\n\n**Basic Data:**\n\n|   <br>Tipo de API  <br>  <br>ID  <br>  <br>Nome  <br>  <br>Client ID  <br>  <br>Client Secret  <br>  <br>Status  <br>  <br>URL Redirecionamento  <br>  <br> |   <br>Travellink_auth Credential  <br>  <br>ID is generated automatically  <br>  <br>Reference name, for example: Developer SSO Test  <br>  <br>Information generated automatically  <br>  <br>Information generated automatically  <br>  <br>Keep Active  <br>  <br>Information that will be reported by the developer.  <br>(Note: When this field is filled, Travellink will validate if the REDIRECT_URL is = field value.  <br>If it is not filled, it will release to any REDIRECT_URL.  <br>  <br> |\n| --- | --- |\n\n**Context :**\n\n|   <br>Unidade  <br>  <br>Agência  <br>  <br>Cliente  <br>  <br>  <br> |   <br>By registering the credential per unit, agency and client, Travellink will respect the same hierarchy.  <br>  <br>  <br>  <br>  <br>  <br>  <br>  <br> |\n| --- | --- |\n\n**Passo 3**\n\nThe Licensee/Operator must inform the Developer of the data from the Client ID and Client Secret fields.\n\n<img src=\"https://content.pstmn.io/915e625c-9cc4-4cc2-b08b-5fb53ea1cc93/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYwODU4LmpwZw==\">\n\n## **Registering the authentication API**\n\n**Autentication**\n\n### Step 1\n\nThe developer must include the button on the authentication page by following the example template:\n\n[https://wooba-sandbox.travellink.com.br/Agencias30/auth/authorize?client_id={CLIENT_ID}&amp;response_type=code&amp;scope=openid&amp;redirect_uri={REDIRECT_URI}](null)\n\n<img src=\"https://content.pstmn.io/0b01c3c2-fa4a-47fe-8434-59bb0d5ac5d1/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxMzE5LmpwZw==\">\n\n**Note:** The Client ID information and the REDIRECT URL are required parameters that must be entered in the URL button .\n\n### Step 2\n\nWhen the user authenticates in Travellink, he will be redirected to the address at REDIRECT_URL, and the authentication token will be sent as **CODE** parameter.\n\nMicrosoftInternetExplorer402DocumentNotSpecified7.8 磅Normal0\n\n**Model of redirection:**\n\n[<u>{REDIRECT_URI</u>](null)}? code={CODE}\n\n[<u>https://mydomain.com.br?code={CODE</u>](null)}\n\nAfter logging in Travellink you will receive the answer below:\n\n**Step 3**  \nAfter obtaining the CODE value the developer should make a Post call to get the **ID_Token**\n\n**Post Example:**  \nPOST /Agencies30/auth/authorize/token HTTP/1.1  \nHost: wooba-sandbox.com.br  \nAuthorization: Basic e0NMSUVOVF9JRH06e0NMSUVOVF9TRUNSRVR9  \n  \nContent-Type: application/json:\n\n{  \n\"grant_type\": \"authorization_code\",  \n\"redirect_uri\": \"{{redirect_uri}}\",  \n\"client_id\": \"{{client_id}}\",  \n\"client_secret\": \"{{client_secret}}\",  \n\"code\": \"{{code}}\"  \n}\n\n<img src=\"https://content.pstmn.io/7463764f-3762-4bfe-9c2d-3b84b9fd8d2c/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxNTQ3LmpwZw==\" width=\"413\" height=\"197\">\n\n**Exemplo www-form-urlencoded:**\n\n**The application/x-www-form-urlencoded format is also accepted**\n\nStartFragmeThe application/x-www-form-urlencoded format is also accepted:\n\nPOST /Agencias30/auth/authorize/token HTTP/1.1  \nHost: wooba-sandbox.com.br  \nAuthorization: Basic e0NMSUVOVF9JRH06e0NMSUVOVF9TRUNSRVR9\n\nContent-Type: application/x-www-form-urlencoded  \ncode={CODE}&client_id={CLIENT_ID}&client_secret={CLIENT_SECRET}&grant_type=authorization_code&redirect_uri={REDIRECT_URI}\n\n<img src=\"https://content.pstmn.io/817e0ce9-6b54-4a7b-ac4a-22a8c06a8f87/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxNjIzLmpwZw==\">\n\nNote: Authorization **{CLIENT_ID}:{CLIENT_SECRET} is encoded into Base64**\n\n**Model of response:**\n\n{  \n\"token_type\": \"Bearer\",  \n\"expires_in\": 3600,  \n\"id_token\": \"token_jwt\"  \n}\n\n<img src=\"https://content.pstmn.io/4d1fad7b-27d8-4271-a7f3-3fd34ec24caa/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxNjQ0LmpwZw==\" width=\"261\" height=\"136\">\n\n**Getting the id_token**\n\n<img src=\"https://content.pstmn.io/3a1689f6-4a6c-4a07-8996-45e1b0413d5c/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxNzExLmpwZw==\">\n\n**User Claims :****Data that is in the Token ID:**\n\n|   <br>sub  <br>  <br>email  <br>  <br>name  <br>  <br>role  <br>  <br>useremails  <br>  <br>phone_number  <br>  <br> |   <br>User Id at Travellink  <br>  <br>User email  <br>  <br>Full name of the user  <br>  <br>Access type of the user – Internal or External  <br>  <br>More than one email per user, these emails are separated by;  <br>  <br>It will only be sent if the user registration has the phone number registered.  <br>  <br> |\n| --- | --- |\n|  |  |\n\n**Claims da Agência:**\n\n|   <br>agencyid  <br>  <br>agencybackofficecode  <br>  <br>agencydocument  <br>  <br>ragencyname  <br>  <br>agencybusinessname  <br>  <br>agencylogoUrl  <br>  <br>agencyaddress1  <br>  <br>agencyaddress2  <br>  <br>agencyneighborhood  <br>  <br>agencycity  <br>  <br>agencyzipCode  <br>  <br>agencystate  <br>  <br>agencycountry  <br>  <br>agencyphonegeneral  <br>  <br>agencyphoneemergency  <br>  <br> |   <br>Agency Id at Travellink  <br>  <br>Backoffice Code (IdERP)  <br>  <br>Agency EIN  <br>  <br>Corporate Name of the Agency  <br>  <br>Trade Name of the Agency  <br>  <br>Agency Logotype (image)  <br>  <br>Address  <br>  <br>Address 2  <br>  <br>District  <br>  <br>City  <br>  <br>Zip code  <br>  <br>State  <br>  <br>Country  <br>  <br>Phone  <br>  <br>Phone/ Emergency contact number  <br>  <br> |\n| --- | --- |\n\n**Step 4**  \nOptional (The developer may use the website JWT.IO to validate the IDtoken.\n\n#### **Id_Token Validation:**\n\n<img src=\"https://content.pstmn.io/4a7826d8-6298-4e19-8048-80ee96db3d2a/Q2FwdHVyYSBkZSB0ZWxhIDIwMjMtMDctMjEgMTYxNzQwLmpwZw==\">\n\n**Access code of the Developer**\n\n**Documentation Link of the openId:**\n\n[https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth](null)","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"24548172","collectionId":"46a42be2-1dd9-463f-90ce-8013256f617d","publishedId":"2s9XxvTEhD","public":true,"publicUrl":"https://documenter-api.postman.tech/view/24548172/2s9XxvTEhD","privateUrl":"https://go.postman.co/documentation/24548172-46a42be2-1dd9-463f-90ce-8013256f617d","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.10.1","publishDate":"2023-08-01T14:57:07.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/768118b36f06c94b0306958b980558e6915839447e859fe16906e29d683976f0","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2s9XxvTEhD"}