Booker Authenticate

import requests headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'Ocp-Apim-Subscription-Key': '5f738133cb354f1d8e50d713238fe8e8' } def authenticate(): url = 'https://api-staging.booker.com/v5/auth/connect/token' params = { 'grant_type': 'client_credentials', 'client_id': 'CVwkWviKzOkk', 'client_secret': 'SYB6F0KxuJPi', 'scope': 'customer' } r = requests.post(url, params=params, headers=headers) return r.json() print authenticate()

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.