Это видео недоступно.
Сожалеем об этом.

Python Requests Authentication Examples - Basic Auth, Custom Headers w/ Code

Поделиться
HTML-код
  • Опубликовано: 11 июл 2021
  • We'll talk about basic authentication and how to use custom headers for tokens in this video with a couple of examples. Want a specific example of the service you're using? Let me know!
    Video on getting started with requests:
    • Python Requests Librar...
    ** Want to clone this script? **
    wayscript.com/...
    Questions about this script or anything else? Join our discord. We're always around to help.
    / discord
    wayscript.com/
    Follow WayScript on Social Media:
    GitHub - github.com/way...
    Twitter - / wayscripthq
    Linkedin - / wayscript
    Instagram - / wayscript
    Facebook - / wayscript
    #WayScript gives you flexible building blocks to seamlessly integrate, automate, and host tools in the cloud. Unlock new potential with drag and drop programming.
    Need ideas on how to use WayScript? View our template library to get ideas:
    wayscript.com/...
    Ready to get started? Get Superpowers with WayScript today.

Комментарии • 52

  • @roberthackett2155
    @roberthackett2155 Месяц назад +1

    Great video! I watched a few others that were overly complicated, but this was easy to follow and got me up and running. Thanks!

  • @brauliocastelblanco6597
    @brauliocastelblanco6597 Год назад +1

    Newbie on API world, reading documentation for 3 hours and thanks to you i finally connect , thanks!

  • @samuelsantos4401
    @samuelsantos4401 Год назад

    Thank you very much.
    I looked for several videos in my language and I couldn't find it, here it was fast and objective.
    Message from Brazil.

  • @adv_rdr
    @adv_rdr 2 года назад +4

    You are an absolute BOSS for making this. Thank you for your help. Really good format. Straight to the point, no BS.

  • @jadeolayy
    @jadeolayy 2 года назад +1

    Thank you much, first time using REST API so wasn't really sure how to translate the API documentation to python code, this helped clear it up quick and easy, thank you for creating!

  • @Are_U_Kidding
    @Are_U_Kidding 28 дней назад

    Great work ❤

  • @sahmedalee
    @sahmedalee 2 года назад +1

    Simple and to the point. Thanks a lot

  • @genesebarbosa
    @genesebarbosa 2 года назад

    Very very simple explanation and helpful !! Thx Bro!!

  • @MarceloLopesdeAmorimJunior
    @MarceloLopesdeAmorimJunior Год назад

    Simple and precise. Way to go! Awesome

  • @gareemadhingra
    @gareemadhingra 2 года назад +1

    Short and crisp

  • @arthurbarbosaqueirozbisnet104
    @arthurbarbosaqueirozbisnet104 2 года назад

    Great video. Simple and explanatory.

  • @n-4446
    @n-4446 Год назад +2

    if the token should not share it with any one how can I involve it the code ? what I'm trying to say is should I put the token in different file rather than type it in the code ? and if it's yes how can I secure that file ?

    • @WayScript
      @WayScript  Год назад

      There's a bunch of ways to tackle this problem. A couple common solutions would be to have the token stored as a secret within the environment that the code is executing in, and use some python like os.environ.get('token') to get that secret key.
      Another way is to encrypt keys and store them somewhere accessible and call them from your script

    • @robthethrone
      @robthethrone Месяц назад

      i know it’s been a while since your comment, but for others who are wondering:
      the common methodology is to “hide” the token in a .env file, and obtain it by importing the variable from .env file

  • @ezezez6150
    @ezezez6150 Год назад

    Thx bro , you saved my ass today.God bless you!

  • @AustinCrider
    @AustinCrider 2 года назад

    Thank you so much for this video!

  • @rodhash
    @rodhash 3 месяца назад

    I don't sub to any channel out there specially the ones that just make us waste time, hate those that don't provide any value and begs for like.. I really like to curate my feed with good stuff in order to have nice information videos on my feed and bro your channel definitely is part of my feed now .. Amazing work, congrats .. hate that I'm finding yours just now

  • @nikoghos
    @nikoghos Год назад

    Thank you. Helped a lot!!

  • @girish6064
    @girish6064 3 месяца назад

    Thank you

  • @KhalilYasser
    @KhalilYasser 2 года назад

    Thank you very much. Awesome tutorial.

  • @prasadsawant7399
    @prasadsawant7399 Год назад

    well explained. Could you in next video add how to cache the token so that it can be reused in subsequent calls? Mainly for performance reasons.

  • @user-vd7op7mk2y
    @user-vd7op7mk2y Год назад

    i need to automate api more than one user in that case i can't use in payload username and password, what should i do,

  • @imogenthorburn1952
    @imogenthorburn1952 2 года назад

    this helped me out so much thanks

  • @zoemercuryastrology7931
    @zoemercuryastrology7931 2 года назад +1

    Thank youuuu!

  • @ibrames3
    @ibrames3 Год назад

    Hey dude! How can I make login in a website that needs a verification code? I have it all: urls, user, pass and gmail credentials (because verification code is sent to gmail) I just need to put that code on the verification URL.

  • @nandoalpha
    @nandoalpha 2 года назад +3

    Man, você me ajudou muito em um case no meu trabalho.
    Muito obrigado!!!

  • @romanpryshlyak252
    @romanpryshlyak252 Год назад

    Thank you!!!

  • @user-uv9vq5ey1f
    @user-uv9vq5ey1f 2 года назад

    I'm doing a bot traffic,and in authentication (log-in) i get a 429 error....I try to put some delays but nothing happent..Do you have any idea?

  • @TheNkina
    @TheNkina Год назад

    this is very helpful, I just want to ask have to dealt with any type of authentication where there are token's involved as well as decoding those tokens?

    • @WayScript
      @WayScript  Год назад

      Hey! normally anytime there's tokens involved you can include them with the payload you send in your POST request. Decoding just depends on how the token is encoded. Python has some built in tools to help with these sorts of things such as codecs docs.python.org/3/library/codecs.html

  • @Vinod-SR
    @Vinod-SR Год назад

    Neat!

  • @osiris5449
    @osiris5449 2 года назад

    thanks!

  • @martimgradicmarreiros3210
    @martimgradicmarreiros3210 3 года назад

    Hi wayscript, nice vid. Also wanted to say, why tf ain't y'all making a part 3 of making a ps5 bot. Part 1 and 2 are pretty much useless cause she didn't explain how to get notifications. It's one of the only good tutorials on youtube on how to make this bot. Hope to see a reaction.

    • @WayScript
      @WayScript  3 года назад

      Yeah her tutorials were great and part #3 has been highly requested! Unfortunately a bit out of my control. I'll put together a notification video that'll be a bit more broad than 'ps5 bot part 3' but should have all the ideas of what part 3 might of ( or might will be ). I'll make sure it integrates into that specific bot too. -Derrick

    • @martimgradicmarreiros3210
      @martimgradicmarreiros3210 3 года назад

      @@WayScript Thanks a lot for your reply (: really appreciate it.

  • @MrArrjohns
    @MrArrjohns Год назад

    My services is requesting a call back URL before they issue an API key. Where can I gat that from?

    • @WayScript
      @WayScript  Год назад

      Callback urls are usually from an application you own or can write code for. So for instance an online service might use a callback url to communicate with a flask application you built to send you information (that you can do something with). You can use WayScript or any other online hosting service to create urls via something like a flask app or node server

  • @paulleon3343
    @paulleon3343 Год назад

    How can you pass multiple headers that have a curl -X GET command

    • @WayScript
      @WayScript  Год назад

      To pass multiple headers, you can include multiple values in the headers json with a comma after each value you want to send. Example:
      headers = {'header-key-1':'header-value-1' , 'header-key-2':'header-value-2'}
      You can add as many as you want, just include a comma after each. Hope that helps!

  • @ishapaul9368
    @ishapaul9368 Год назад

    How do I add session id to header for graphql api?

    • @WayScript
      @WayScript  Год назад

      Apologies for the late response, we were on break here at wayscript. To add multiple headers, you can include them like:
      headers = {'header1':'value1', 'header2':'value2'}
      You can add as many as you want by separating with a comma

  • @chidanshbhatt2244
    @chidanshbhatt2244 2 года назад

    Where did you get token value?

    • @WayScript
      @WayScript  2 года назад +1

      The token value is what you get from whatever service you're using. In this example it came from Atlassian's site > settings > Account API Token. Each service you use will likely put that token in a different place under your account settings. If you get stuck trying to find it, the site's docs will probably tell you where to find it ( if their docs are any good haha ) - Derrick

  • @ButerWarrior44
    @ButerWarrior44 2 года назад

    get? Why not post?

  • @strashnayazhenshina2180
    @strashnayazhenshina2180 Год назад

    The guy looks like Milla Jovovich's son!

  • @emure5385
    @emure5385 3 года назад

    PS5 Restock Part 3 please.

  • @blessedday6808
    @blessedday6808 2 года назад

    Thank you