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

syntax question, not in online refernce (1997) Formating Tables w/[founditems] (1998) PCS Frames-Default page is solution! (1997) Re:HELP - NONE STOP DIGESTS. Digest for 4/24/97) (1997) no global [username] or [password] displayed ... (1997) WebCat2b12 CGI Mac -- Problems propagating the cart through frames...still (1997) 4.5 Upgrade (2003) Forcing a NEWCART (1997) Unknown error: OrderNotCreated (1997) Still More on EudoraPro Email (1998) counting characters and/or words (1997) webCat craps httpd (2005) sorting and grouping (1998) A multi-processor savvy WebCatalog? (1997) Digest for 4/18/97 (1997) faxing orders (2000) Custom formulas.db (1998) Add to Cart & List of Products (1997) WebMerchant 1.6 and SHTML (1997) $Replace with [founditems] (1997)