I’m a new python programmer, i’m just learning so please be gentle with your answers! For some reason i keep on getting a “Bad Request” error when i try to create a new user on pixela and i really don’t know what I’m doing wrong.
this is my code, i’ve hid the token and username i’d like to use, but they fit the validations.
import requests
pixela_endpoint = "https://pixe.la/v1/users"
username = [removed]
token = [removed]
user_params = {
"token": token,
"username": username,
"agreeTermsOfService": "yes",
"notMinor": "yes"
}
response = requests.post(url=pixela_endpoint, params=user_params)
response.raise_for_status()
print(response)
the error code im getting is:
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url
I feel like i’m losing my mind cause i cant seem to get it right.
I tried fixing spelling issues and confirming i was using the correct api link. however nothing has changed and i keep getting the bad request error.
Bankole Dara is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.