Closed salimdason closed 3 years ago
@salimdason Thank you for reporting. But, I could not reproduce it. Would you paste the command when you tried to create an account?
Hello @a-know, sure. I've tried using different configurations for the token but still no joy. I've included the code snippet. Thanks for taking a look.
import requests
USERNAME = 'usernameiused' TOKEN = "khajbdvahdgy72y8his83"
pixela_endpoint ="https://pixe.la/v1/users"
user_params = { "token": "TOKEN", "username": "USERNAME", "agreeTermsOfService": "yes", "notminor": "yes" }
response = requests.post(url=pixela_endpoint, json=user_params) print(response.text)
{"message":"The token string must be at least 8 characters and not more than 128 letters and numbers or alphanumeric characters or symbols.","isSuccess":false}
Hi @salimdason , thank you for detail.
Are you using Python or something else to run the Pixela API? I don't know Python well, but the following sections looks bad:
"token": "TOKEN",
TOKEN = "khajbdvahdgy72y8his83"
is variable. So the user_params
must be as follows, right?
(And, USERNAME
too.)
user_params = {
"token": TOKEN,
"username": USERNAME,
"agreeTermsOfService": "yes",
"notminor": "yes"
}
Please check this :)
Hello @a-know nice looking out. I am using python. I just saw the error after you pointed it out. I was passing TOKEN and USERNAME as strings instead of variables. Sorry for the inconvenience, and thanks for catching the error.
@salimdason No problem at all. Don't worry about it. I am really glad that your problem is solved! 😄
And, thank you for using Pixela. I hope you continue to enjoy it! :)
Issue with token authentication when creating an account. It returns the message: {"message":"The token string must be at least 8 characters and not more than 128 letters and numbers or alphanumeric characters or symbols.","isSuccess":false}
Regardless of what I use. PS: I know the Validation rule: [ -~]{8,128.
This is the token I have used: TOKEN = "khajbdvahdgy72y8his83"