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

Text limits in NT version? (1997) Line Feed Character Appended (1998) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) WebStar Secure on other machine (1997) Notepad problems (1998) Problems with ErrorLog on Linux (2000) How to verify email address (1997) Sample Tearoom Search Error (1997) TPC Connect (1999) Sort Order on a page search (1997) [random] only for 1-100??? (1997) Stopping bad HTML propagation ? (1997) Shell Script needed (2003) Typhoon Rev. and PCS store problems (1999) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) Requiring that certain fields be completed (1997) can WC render sites out? (1997) Need help... (1997) WebDNA Server Not Running (2005) [BoldWords] WebCat.acgib15Mac (1997)