How to use the UPS api oauth 2.0 auth
HTML-код
- Опубликовано: 3 авг 2024
- This video shows how to use the oauth 2.0 api for the UPS api.
Here is a follow up video for you with the code example
• UPS api oauth 2.0 get ...
Here is the example code.
github.com/JohnAwesomeJr/ups-...
Thanks for watching
You made my life easier. I faced the same struggle you had. After seeing the video, I know what i have to do. Thank you!
I am glad it helped you.
Your intro is so funny, I was LMAO. You can feel the saltiness in your words 😂😂 An thank you very much for posting this!
Glad you enjoyed it.
Yeah so basically you're using the client_credentials method, not the auth_code
auth_code is supposed to send you to a page where you enter your logins and then redirect to the redirect_uri where this page should fetch the access_token and use this for the following requests.
client_credentials is when you know the credentials and generate a token with it.
A bit missleading when you say "ignore the clientcredentials" etc when you actually show the client_credentials code haha
But otherwise, very clear and good video
Ya, I had such a hard time figuring this out. I have also learned a lot more since this video was posted but I am glad people are getting value out of the video even though it might not be perfect. Thanks for the comment.
@@johnchristensen3869 My bad, rereading my message, it looks harsh ! I didn't mean it to be mean !
Your video is really great, and I'm pretty it enlightened people on this messy documentation ! Very great job :D
some heroes don't wear capes...
Thank you my friend
Good video, thanks! btw, the part you had removed from the sample code and couldn't find was the Package -> SimpleRate array
Hey thank you so much. I knew I was missing something.
Great thank you!
You're welcome!
Thanks! 🙂
👍
THANK YOU for putting this up! I have a question tho. Yes, I did get the client and secret; that was the easy part. But now.. when I go to the OAuthAuthCode and want to try it out, the fields that are required are grant_type ("authorization_code"), redirect_uri (ok.. no problem) and.. code. That last one is the "Authorization code from the UPS login system". I saw you didn't have that on your screen. Any idea how to get that code tho? I know you can get it with the Authorize Client.. but that's a huge pain, because I had to put it in the browser, because it wants me to log in.. Am I missing something??
here is a follow up video for you with the code example
ruclips.net/video/DNSbsYRqs3k/видео.html
@@johnchristensen3869 Thank you SO MUCH for this! I had enough by using your first video. I would like to add a few comments though: Instead of "Rate", you can use "Shop" (in your code that's the value of $requestoption). You will then get ALL the available rates back and can read this out of the json response... so you'll just need 1 call for all the rates instead of 1 for each individually. I also removed the package dimensions and that didn't make a difference. Have you had any issues with removing the package dimensions? (I removed that, because it'll always be different and won't know beforehand what the dimensions would be anyway..)
The video is very helpful thanks. BTW do you know what transactionSrc and transId are?
those are defined by user, you can put whatever alphanumeric value in. called and confirmed with UPS api sup
Yes, I believe that is correct.
Hi again John. The new comments aren’t showing up.
*Correction: the question I asked earlier and perhaps 2 answers to that question.
For some reason this comment specifically is showing up 🤷♂️
Here is a follow up video for you with the code example
ruclips.net/video/DNSbsYRqs3k/видео.html
Here is a follow up video for you with the code example
ruclips.net/video/DNSbsYRqs3k/видео.html
I watched both videos, but I still can't find what you are passing for the required param code "Authorization code from the UPS login system" if I try the request without it - I just get an error saying "message": "Invalid/Missing Authorization Code". Where/how do I obtain this authorization code? Thanks!
I have all the configuration set, have a developer account with client and secret, make the call and I get an "Invalid/Missing Authorization Code". No idea why this is coming back. I am using postman to make the call, it is doing the base64 encoding on the client and secret. No idea how to make this work.
If you can show me the code I will take a look at it.
@@johnchristensen3869 I figured it out, of course it was not in the documentation anywhere, the issue was tied to the "grant_type". I was using the default until I looked through your code and changed it to "client_credentials". So thank you again for this post. I am now struggling with the tracking API. Support was useless in helping as expected.
I have not looked at the tracking one myself. If I start working on a project with that I will definitely keep you updated. Sorry I’m not much help on that one right now.
Can someone integration UPS in Magento 2?
Ya, that sounds like a fun project. Unfortunately I don’t have the time to jump into that right now. I will let you know if I work on something right now in the future.