**Working AND Clean** PHP CLASS with new OAuth2.0 #296
Replies: 8 comments 17 replies
-
If I wanted to modify this to be an API on my website how would I do that ? (I am a mobile engineer, not a PHP Developer this is all black voodoo to me :) ) |
Beta Was this translation helpful? Give feedback.
-
In my experience, the cookie must be set in steps 3 and 4 in addition to step 2. |
Beta Was this translation helpful? Give feedback.
-
I am getting on Step3: You don't have permission to access "http://auth.tesla.com/oauth2/v3/token" on this server. |
Beta Was this translation helpful? Give feedback.
-
Doesnt work anymore. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, after digging into the code from @ralfonso4, I was able to fix the "Access Denied"-Problem. The solution for me, was the take the tesla-cookie from request "x-1" and put it in "request "x". Here is the code, which is (currently) working fine for me, hopefully for you, too:
|
Beta Was this translation helpful? Give feedback.
-
Sorry, |
Beta Was this translation helpful? Give feedback.
-
Looks like it's no longer working unfortunately. Getting "You don't have permission to access "http://auth.tesla.com/oauth2/v3/authorize?" on this server.
|
Beta Was this translation helpful? Give feedback.
-
I've tried debugging but then I found teslafi chrome extension got SSO and from there I've used postman but I think rest of that class should work as well. SSO is the tricky part. |
Beta Was this translation helpful? Give feedback.
-
This is the final code with some improvements.
Edited: 2021/02/06
Beta Was this translation helpful? Give feedback.
All reactions