I keep on getting a “Bad Request” error when I try to create a new user on pixela. This is my code, I’ve hidden 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 I’m getting is:
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url
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.
New contributor
Bankole Dara is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.