import requests
import json

app_id = 'wendys'
app_secret = 'test'

headers = {"Content-Type":"application/json"}
payload = {"app_id":app_id,"app_secret":app_secret}

# Convert to json
payload=json.dumps(payload)

# URL for requesting token
tok_url = 'http://localhost:8088/apps/access_token/'

r = requests.post(tok_url, headers=headers, data=payload)

r = json.loads(r.text)

token = r['token']
print('-------------------------------------------------------------------')
print(r)

3581b7f2cbbbb4db56543c8ecb726d0136b6ef09
<mask token>

<mask token>
print('-------------------------------------------------------------------')
print(r)

<mask token>
app_id = 'wendys'
app_secret = 'test'
headers = {'Content-Type': 'application/json'}
payload = {'app_id': app_id, 'app_secret': app_secret}
payload = json.dumps(payload)
tok_url = 'http://localhost:8088/apps/access_token/'
r = requests.post(tok_url, headers=headers, data=payload)
r = json.loads(r.text)
token = r['token']
print('-------------------------------------------------------------------')
print(r)

import requests
import json
app_id = 'wendys'
app_secret = 'test'
headers = {'Content-Type': 'application/json'}
payload = {'app_id': app_id, 'app_secret': app_secret}
payload = json.dumps(payload)
tok_url = 'http://localhost:8088/apps/access_token/'
r = requests.post(tok_url, headers=headers, data=payload)
r = json.loads(r.text)
token = r['token']
print('-------------------------------------------------------------------')
print(r)

import requests
import json

app_id = 'wendys'
app_secret = 'test'

headers = {"Content-Type":"application/json"}
payload = {"app_id":app_id,"app_secret":app_secret}

# Convert to json
payload=json.dumps(payload)

# URL for requesting token
tok_url = 'http://localhost:8088/apps/access_token/'

r = requests.post(tok_url, headers=headers, data=payload)

r = json.loads(r.text)

token = r['token']
print('-------------------------------------------------------------------')
print(r)
