[WebDNA] YouTube API v2.0 - OAuth 2.0 Authorization

This WebDNA talk-list message is from

2013


It keeps the original formatting.
numero = 110547
interpreted = N
texte = --20cf30223abbc2785504e3533b15 Content-Type: text/plain; charset=ISO-8859-1 Hi, I can't seem to make this work and I am hoping somebody can help or point me in the right direction. I can get to step 4 but have been unable to exchange the authorization code for an access token. I've tried a couple of variations of Tom's twitter code, but I just get hung up - which I have read is because of HTTP/1.1 vs. 1.0 and the expectation of a persistent connection. To get the authorization code, I just built a link: [text]debug=T[/text] [text]client_id=XXXXX[/text] [text]redirect_uri=XXXXX[/text] [text]client_secret=XXXX[/text] [text]theScope=https://www.googleapis.com/auth/youtube.readonly[/text] Ask which gets me to [showif [state]=2] code: [code]
--> insert failed code here to get json response [/showif] I have tried multiple variations of: [/!][text]content=grant_type=authorization_code[/text][!] [/!][text]jsonResponse=[TCPConnect host=accounts.google.com &port=443&ssl=T][!] [/!][tcpsend skipheader=F]POST /o/oauth2/token?code=[code]&[!] [/!]client_id=[client_id]&[!] [/!]client_secret=[client_secret]&[!] [/!]redirect_uri=[redirect_uri]&grant_type=authorization_code HTTP/1.1[CRLF][!] [/!]Host: accounts.google.com[CRLF][!] [/!]Content-type: application/x-www-form-urlencoded[CRLF][!] [/!][/tcpsend][/tcpconnect][/text][!] ## debug info ## [/!][showif [debug]=T]

OAuth Json Response

[jsonResponse]
[/showif][!] Tom's version for twitter worked perfectly but the YT format is different. link: https://developers.google.com/youtube/2.0/developers_guide_protocol_oauth2#OAuth2_Server_Side_Web_Applications_Flow thanks in advance!! d. --20cf30223abbc2785504e3533b15 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I can't seem to m= ake this work and I am hoping somebody can help or point me in the right di= rection.

I can get to step 4 but have been unable to exchange = the authorization code for an access token.

I've tried a couple of variations of Tom's twitter code, = but I just get hung up - which I have read is because of HTTP/1.1 vs. 1.0 a= nd the expectation of a persistent connection.

To get the auth= orization code, I just built a link:

[text]debug=3DT[/text]
[text]client_id=3DXXXXX[/text]
[text]redir= ect_uri=3DXXXXX[/text]
[text]client_secret=3DXXXX[/text]
[text]theSco= pe=3Dht= tps://www.googleapis.com/auth/youtube.readonly[/text]

<a href=3D"ht= tps://accounts.google.com/o/oauth2/auth?client_id=3D[client_id]&redirec= t_uri=3D[redirect_uri]&scope=3D[theScope]&response_type=3Dcode&= access_type=3Doffline&state=3D2">Ask</a>


which gets me to

[showif [sta= te]=3D2]

code: [code]<br />

--> insert fa= iled code here to get json response

[/showif]<= br>
I have tried multiple variations of:


[/!][text]co= ntent=3Dgrant_type=3Dauthorization_code[/text][!]

[/!][text]jsonResp= onse=3D[TCPConnect host=3Daccounts.g= oogle.com&port=3D443&ssl=3DT][!]
[/!][tcpsend skipheader=3DF]POST /o/oauth2/token?code=3D[code]&[!]
[= /!]client_id=3D[client_id]&[!]
[/!]client_secret=3D[client_secret]&a= mp;[!]
[/!]redirect_uri=3D[redirect_uri]&grant_type=3Dauthorization_= code HTTP/1.1[CRLF][!]
[/!]Host: accounts.google.com[CR= LF][!]
[/!]Content-type: application/x-www-form-urlencoded[CRLF][!]
[= /!][/tcpsend][/tcpconnect][/text][!]

## debug info ##
[/!][showif= [debug]=3DT]<h3>OAuth Json Response</h3>
<pre>[jsonResponse]</pre>[/showif][!]

<= div>

Tom's version for twitter worked perfectly but t= he YT format is different.

thanks in advance!!

d.
--20cf30223abbc2785504e3533b15-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] YouTube API v2.0 - OAuth 2.0 Authorization (David Bastedo 2013)
  2. Re: [WebDNA] YouTube API v2.0 - OAuth 2.0 Authorization (aaronmichaelmusic@gmail.com 2013)
  3. [WebDNA] YouTube API v2.0 - OAuth 2.0 Authorization (David Bastedo 2013)
--20cf30223abbc2785504e3533b15 Content-Type: text/plain; charset=ISO-8859-1 Hi, I can't seem to make this work and I am hoping somebody can help or point me in the right direction. I can get to step 4 but have been unable to exchange the authorization code for an access token. I've tried a couple of variations of Tom's twitter code, but I just get hung up - which I have read is because of HTTP/1.1 vs. 1.0 and the expectation of a persistent connection. To get the authorization code, I just built a link: [text]debug=T[/text] [text]client_id=XXXXX[/text] [text]redirect_uri=XXXXX[/text] [text]client_secret=XXXX[/text] [text]theScope=https://www.googleapis.com/auth/youtube.readonly[/text] Ask which gets me to [showif [state]=2] code: [code]
--> insert failed code here to get json response [/showif] I have tried multiple variations of: [/!][text]content=grant_type=authorization_code[/text][!] [/!][text]jsonResponse=[TCPConnect host=accounts.google.com &port=443&ssl=T][!] [/!][tcpsend skipheader=F]POST /o/oauth2/token?code=[code]&[!] [/!]client_id=[client_id]&[!] [/!]client_secret=[client_secret]&[!] [/!]redirect_uri=[redirect_uri]&grant_type=authorization_code HTTP/1.1[CRLF][!] [/!]Host: accounts.google.com[CRLF][!] [/!]Content-type: application/x-www-form-urlencoded[CRLF][!] [/!][/tcpsend][/tcpconnect][/text][!] ## debug info ## [/!][showif [debug]=T]

OAuth Json Response

[jsonResponse]
[/showif][!] Tom's version for twitter worked perfectly but the YT format is different. link: https://developers.google.com/youtube/2.0/developers_guide_protocol_oauth2#OAuth2_Server_Side_Web_Applications_Flow thanks in advance!! d. --20cf30223abbc2785504e3533b15 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I can't seem to m= ake this work and I am hoping somebody can help or point me in the right di= rection.

I can get to step 4 but have been unable to exchange = the authorization code for an access token.

I've tried a couple of variations of Tom's twitter code, = but I just get hung up - which I have read is because of HTTP/1.1 vs. 1.0 a= nd the expectation of a persistent connection.

To get the auth= orization code, I just built a link:

[text]debug=3DT[/text]
[text]client_id=3DXXXXX[/text]
[text]redir= ect_uri=3DXXXXX[/text]
[text]client_secret=3DXXXX[/text]
[text]theSco= pe=3Dht= tps://www.googleapis.com/auth/youtube.readonly[/text]

<a href=3D"ht= tps://accounts.google.com/o/oauth2/auth?client_id=3D[client_id]&redirec= t_uri=3D[redirect_uri]&scope=3D[theScope]&response_type=3Dcode&= access_type=3Doffline&state=3D2">Ask</a>


which gets me to

[showif [sta= te]=3D2]

code: [code]<br />

--> insert fa= iled code here to get json response

[/showif]<= br>
I have tried multiple variations of:


[/!][text]co= ntent=3Dgrant_type=3Dauthorization_code[/text][!]

[/!][text]jsonResp= onse=3D[TCPConnect host=3Daccounts.g= oogle.com&port=3D443&ssl=3DT][!]
[/!][tcpsend skipheader=3DF]POST /o/oauth2/token?code=3D[code]&[!]
[= /!]client_id=3D[client_id]&[!]
[/!]client_secret=3D[client_secret]&a= mp;[!]
[/!]redirect_uri=3D[redirect_uri]&grant_type=3Dauthorization_= code HTTP/1.1[CRLF][!]
[/!]Host: accounts.google.com[CR= LF][!]
[/!]Content-type: application/x-www-form-urlencoded[CRLF][!]
[= /!][/tcpsend][/tcpconnect][/text][!]

## debug info ##
[/!][showif= [debug]=3DT]<h3>OAuth Json Response</h3>
<pre>[jsonResponse]</pre>[/showif][!]

<= div>

Tom's version for twitter worked perfectly but t= he YT format is different.

thanks in advance!!

d.
--20cf30223abbc2785504e3533b15-- David Bastedo

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Custom WebCat Prefs ... (1997) For those of you not on the WebCatalog Beta... (1997) Help name our technology! I found it (1997) F2 to F3 rocky transition (1997) Searching,Brain Dead! (1999) PCS Frames (1997) Version clarification, please ... (1998) Does Flushing the Master Databases Flush Databases from a (2004) Another question about credit cards (1997) Click-through/Referral tracking solution needed (2000) ShipToState question (1998) WebCat2b12 - nesting [tags] (1997) Credit card types (1997) PIXO support (1997) Quitting WebMerchant ? (1997) [shownext max=?] armed (1997) Generating unique SKU from [cart] (1997) [OT] Discussion forum, last visit, Cookie, ... (2003) WebCat2 beta 11 - new prefs ... (1997) WebCat2: Items xx to xx shown, etc. (1997)