Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import json
- import requests
- from requests.auth import HTTPBasicAuth
- base_url = "https://photoai.lotlinx.com"
- username = "testaccount8"
- password = "79b41e211568"
- def RequestToken():
- endpoint = base_url + "/images/optimize"
- session = requests.Session()
- session.auth = (username, password)
- data = [{
- "dealerID": 54345,
- "vehicles": [{"id": 65, "images": [{"imageId": 43, "imageUrl": "https://img.lotlinx.com/vdn/7416/jeep_wrangler%20unlimited_2014_1C4BJWFG3EL326863_7416_5_339187295.jpg"}]}]
- }]
- resp = session.post(url=endpoint, data=data)
- return resp
- r = RequestToken()
- print(r.json())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement