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

Removing items from a cart is wonky... (1998) Sendmail html/text and CCS problem (2003) Date search - yes or no (1997) Forms (1997) Reversed words (1997) WebCat2b13MacPlugIn - [shownext method=post] ??? (1997) [WebDNA] Version 8 (2014) Email notification to one of multiple vendors ? (1997) addlineitem mystery (2003) How do I pass [cart] when user clicks back (2000) dates as search criteria (2000) Search bug. Help (2002) PARAMETER vs. OPERATOR (was The BUG is BACK ...) (1998) Authorize.Net and AIM (2004) WC2f3 (1997) [SHOWNEXT] Examples (1997) Virtual Postcard almost complete... (1998) Configuring E-mail (1997) Autoreturn Submit? (1997) Looking up two prices in Formulas.db (1997)