oauth2-api.json 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. {
  2. "kind": "discovery#restDescription",
  3. "etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/41xzEr7Raz2twp-5wqtU1brxM4E\"",
  4. "discoveryVersion": "v1",
  5. "id": "oauth2:v2",
  6. "name": "oauth2",
  7. "version": "v2",
  8. "revision": "20160122",
  9. "title": "Google OAuth2 API",
  10. "description": "Lets you access OAuth2 protocol related APIs.",
  11. "ownerDomain": "google.com",
  12. "ownerName": "Google",
  13. "icons": {
  14. "x16": "http://www.google.com/images/icons/product/search-16.gif",
  15. "x32": "http://www.google.com/images/icons/product/search-32.gif"
  16. },
  17. "documentationLink": "https://developers.google.com/accounts/docs/OAuth2",
  18. "protocol": "rest",
  19. "baseUrl": "https://www.googleapis.com/",
  20. "basePath": "/",
  21. "rootUrl": "https://www.googleapis.com/",
  22. "servicePath": "",
  23. "batchPath": "batch",
  24. "parameters": {
  25. "alt": {
  26. "type": "string",
  27. "description": "Data format for the response.",
  28. "default": "json",
  29. "enum": [
  30. "json"
  31. ],
  32. "enumDescriptions": [
  33. "Responses with Content-Type of application/json"
  34. ],
  35. "location": "query"
  36. },
  37. "fields": {
  38. "type": "string",
  39. "description": "Selector specifying which fields to include in a partial response.",
  40. "location": "query"
  41. },
  42. "key": {
  43. "type": "string",
  44. "description": "API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.",
  45. "location": "query"
  46. },
  47. "oauth_token": {
  48. "type": "string",
  49. "description": "OAuth 2.0 token for the current user.",
  50. "location": "query"
  51. },
  52. "prettyPrint": {
  53. "type": "boolean",
  54. "description": "Returns response with indentations and line breaks.",
  55. "default": "true",
  56. "location": "query"
  57. },
  58. "quotaUser": {
  59. "type": "string",
  60. "description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.",
  61. "location": "query"
  62. },
  63. "userIp": {
  64. "type": "string",
  65. "description": "IP address of the site where the request originates. Use this if you want to enforce per-user limits.",
  66. "location": "query"
  67. }
  68. },
  69. "auth": {
  70. "oauth2": {
  71. "scopes": {
  72. "https://www.googleapis.com/auth/plus.login": {
  73. "description": "Know the list of people in your circles, your age range, and language"
  74. },
  75. "https://www.googleapis.com/auth/plus.me": {
  76. "description": "Know who you are on Google"
  77. },
  78. "https://www.googleapis.com/auth/userinfo.email": {
  79. "description": "View your email address"
  80. },
  81. "https://www.googleapis.com/auth/userinfo.profile": {
  82. "description": "View your basic profile info"
  83. }
  84. }
  85. }
  86. },
  87. "schemas": {
  88. "Jwk": {
  89. "id": "Jwk",
  90. "type": "object",
  91. "properties": {
  92. "keys": {
  93. "type": "array",
  94. "items": {
  95. "type": "object",
  96. "properties": {
  97. "alg": {
  98. "type": "string",
  99. "default": "RS256"
  100. },
  101. "e": {
  102. "type": "string"
  103. },
  104. "kid": {
  105. "type": "string"
  106. },
  107. "kty": {
  108. "type": "string",
  109. "default": "RSA"
  110. },
  111. "n": {
  112. "type": "string"
  113. },
  114. "use": {
  115. "type": "string",
  116. "default": "sig"
  117. }
  118. }
  119. }
  120. }
  121. }
  122. },
  123. "Tokeninfo": {
  124. "id": "Tokeninfo",
  125. "type": "object",
  126. "properties": {
  127. "access_type": {
  128. "type": "string",
  129. "description": "The access type granted with this token. It can be offline or online."
  130. },
  131. "audience": {
  132. "type": "string",
  133. "description": "Who is the intended audience for this token. In general the same as issued_to."
  134. },
  135. "email": {
  136. "type": "string",
  137. "description": "The email address of the user. Present only if the email scope is present in the request."
  138. },
  139. "expires_in": {
  140. "type": "integer",
  141. "description": "The expiry time of the token, as number of seconds left until expiry.",
  142. "format": "int32"
  143. },
  144. "issued_to": {
  145. "type": "string",
  146. "description": "To whom was the token issued to. In general the same as audience."
  147. },
  148. "scope": {
  149. "type": "string",
  150. "description": "The space separated list of scopes granted to this token."
  151. },
  152. "token_handle": {
  153. "type": "string",
  154. "description": "The token handle associated with this token."
  155. },
  156. "user_id": {
  157. "type": "string",
  158. "description": "The obfuscated user id."
  159. },
  160. "verified_email": {
  161. "type": "boolean",
  162. "description": "Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request."
  163. }
  164. }
  165. },
  166. "Userinfoplus": {
  167. "id": "Userinfoplus",
  168. "type": "object",
  169. "properties": {
  170. "email": {
  171. "type": "string",
  172. "description": "The user's email address."
  173. },
  174. "family_name": {
  175. "type": "string",
  176. "description": "The user's last name."
  177. },
  178. "gender": {
  179. "type": "string",
  180. "description": "The user's gender."
  181. },
  182. "given_name": {
  183. "type": "string",
  184. "description": "The user's first name."
  185. },
  186. "hd": {
  187. "type": "string",
  188. "description": "The hosted domain e.g. example.com if the user is Google apps user."
  189. },
  190. "id": {
  191. "type": "string",
  192. "description": "The obfuscated ID of the user."
  193. },
  194. "link": {
  195. "type": "string",
  196. "description": "URL of the profile page."
  197. },
  198. "locale": {
  199. "type": "string",
  200. "description": "The user's preferred locale."
  201. },
  202. "name": {
  203. "type": "string",
  204. "description": "The user's full name."
  205. },
  206. "picture": {
  207. "type": "string",
  208. "description": "URL of the user's picture image."
  209. },
  210. "verified_email": {
  211. "type": "boolean",
  212. "description": "Boolean flag which is true if the email address is verified. Always verified because we only return the user's primary email address.",
  213. "default": "true"
  214. }
  215. }
  216. }
  217. },
  218. "methods": {
  219. "getCertForOpenIdConnect": {
  220. "id": "oauth2.getCertForOpenIdConnect",
  221. "path": "oauth2/v2/certs",
  222. "httpMethod": "GET",
  223. "response": {
  224. "$ref": "Jwk"
  225. }
  226. },
  227. "tokeninfo": {
  228. "id": "oauth2.tokeninfo",
  229. "path": "oauth2/v2/tokeninfo",
  230. "httpMethod": "POST",
  231. "parameters": {
  232. "access_token": {
  233. "type": "string",
  234. "location": "query"
  235. },
  236. "id_token": {
  237. "type": "string",
  238. "location": "query"
  239. },
  240. "token_handle": {
  241. "type": "string",
  242. "location": "query"
  243. }
  244. },
  245. "response": {
  246. "$ref": "Tokeninfo"
  247. }
  248. }
  249. },
  250. "resources": {
  251. "userinfo": {
  252. "methods": {
  253. "get": {
  254. "id": "oauth2.userinfo.get",
  255. "path": "oauth2/v2/userinfo",
  256. "httpMethod": "GET",
  257. "response": {
  258. "$ref": "Userinfoplus"
  259. },
  260. "scopes": [
  261. "https://www.googleapis.com/auth/plus.login",
  262. "https://www.googleapis.com/auth/plus.me",
  263. "https://www.googleapis.com/auth/userinfo.email",
  264. "https://www.googleapis.com/auth/userinfo.profile"
  265. ]
  266. }
  267. },
  268. "resources": {
  269. "v2": {
  270. "resources": {
  271. "me": {
  272. "methods": {
  273. "get": {
  274. "id": "oauth2.userinfo.v2.me.get",
  275. "path": "userinfo/v2/me",
  276. "httpMethod": "GET",
  277. "response": {
  278. "$ref": "Userinfoplus"
  279. },
  280. "scopes": [
  281. "https://www.googleapis.com/auth/plus.login",
  282. "https://www.googleapis.com/auth/plus.me",
  283. "https://www.googleapis.com/auth/userinfo.email",
  284. "https://www.googleapis.com/auth/userinfo.profile"
  285. ]
  286. }
  287. }
  288. }
  289. }
  290. }
  291. }
  292. }
  293. }
  294. }