Giter Site home page Giter Site logo

Token Authentication about pixela HOT 5 CLOSED

a-know avatar a-know commented on May 17, 2024 1
Token Authentication

from pixela.

Comments (5)

salimdason avatar salimdason commented on May 17, 2024 2

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.

from pixela.

a-know avatar a-know commented on May 17, 2024 1

@salimdason
Thank you for reporting.
But, I could not reproduce it. Would you paste the command when you tried to create an account?

from pixela.

a-know avatar a-know commented on May 17, 2024 1

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 :)

from pixela.

a-know avatar a-know commented on May 17, 2024 1

@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! :)

from pixela.

salimdason avatar salimdason commented on May 17, 2024

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

#Create User Account

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}

from pixela.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.