my code and other person code exact same except username id or token but mine give error that username not exists or token is wrong
import requests
USERNAME = “khush69”
TOKEN = “hdlsshhieh4466ohs9w”
pixela_endpoint = “https://pixe.la/v1/users”
user_params = {
“token”: TOKEN,
“username”: USERNAME,
“agreeTermsOfService”: “yes”,
“notMinor”: “yes”
}
graph_endoint = f”{pixela_endpoint}/{USERNAME}/graphs”
graph_config = {
“id”: “graph6969”,
“name”: “Coding Learning Graph”,
“unit”: “hour”,
“type”: “float”,
“color”: “shibafu”
}
headers = {
“X-USER-TOKEN”:TOKEN
}
response = requests.post(url=graph_endoint, json=graph_config, headers=headers)
print(response.text)
Khushal Singh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.