oauth2-api.json 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407
  1. {
  2. "kind": "discovery#restDescription",
  3. "etag": "\"bRFOOrZKfO9LweMbPqu0kcu6De8/yCQRfFHTc1fLhzplai55D8MzAks\"",
  4. "discoveryVersion": "v1",
  5. "id": "oauth2:v1",
  6. "name": "oauth2",
  7. "version": "v1",
  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. "Raw": {
  124. "id": "Raw",
  125. "type": "object",
  126. "properties": {
  127. "keyvalues": {
  128. "type": "array",
  129. "items": {
  130. "type": "object",
  131. "properties": {
  132. "algorithm": {
  133. "type": "string",
  134. "default": "RSA"
  135. },
  136. "exponent": {
  137. "type": "string"
  138. },
  139. "keyid": {
  140. "type": "string"
  141. },
  142. "modulus": {
  143. "type": "string"
  144. }
  145. }
  146. }
  147. }
  148. }
  149. },
  150. "Tokeninfo": {
  151. "id": "Tokeninfo",
  152. "type": "object",
  153. "properties": {
  154. "access_type": {
  155. "type": "string",
  156. "description": "The access type granted with this token. It can be offline or online."
  157. },
  158. "audience": {
  159. "type": "string",
  160. "description": "Who is the intended audience for this token. In general the same as issued_to."
  161. },
  162. "email": {
  163. "type": "string",
  164. "description": "The email address of the user. Present only if the email scope is present in the request."
  165. },
  166. "email_verified": {
  167. "type": "boolean",
  168. "description": "Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request."
  169. },
  170. "expires_in": {
  171. "type": "integer",
  172. "description": "The expiry time of the token, as number of seconds left until expiry.",
  173. "format": "int32"
  174. },
  175. "issued_at": {
  176. "type": "integer",
  177. "description": "The issue time of the token, as number of seconds.",
  178. "format": "int32"
  179. },
  180. "issued_to": {
  181. "type": "string",
  182. "description": "To whom was the token issued to. In general the same as audience."
  183. },
  184. "issuer": {
  185. "type": "string",
  186. "description": "Who issued the token."
  187. },
  188. "nonce": {
  189. "type": "string",
  190. "description": "Nonce of the id token."
  191. },
  192. "scope": {
  193. "type": "string",
  194. "description": "The space separated list of scopes granted to this token."
  195. },
  196. "user_id": {
  197. "type": "string",
  198. "description": "The obfuscated user id."
  199. },
  200. "verified_email": {
  201. "type": "boolean",
  202. "description": "Boolean flag which is true if the email address is verified. Present only if the email scope is present in the request."
  203. }
  204. }
  205. },
  206. "Userinfoplus": {
  207. "id": "Userinfoplus",
  208. "type": "object",
  209. "properties": {
  210. "email": {
  211. "type": "string",
  212. "description": "The user's email address."
  213. },
  214. "family_name": {
  215. "type": "string",
  216. "description": "The user's last name."
  217. },
  218. "gender": {
  219. "type": "string",
  220. "description": "The user's gender."
  221. },
  222. "given_name": {
  223. "type": "string",
  224. "description": "The user's first name."
  225. },
  226. "hd": {
  227. "type": "string",
  228. "description": "The hosted domain e.g. example.com if the user is Google apps user."
  229. },
  230. "id": {
  231. "type": "string",
  232. "description": "The obfuscated ID of the user."
  233. },
  234. "link": {
  235. "type": "string",
  236. "description": "URL of the profile page."
  237. },
  238. "locale": {
  239. "type": "string",
  240. "description": "The user's preferred locale."
  241. },
  242. "name": {
  243. "type": "string",
  244. "description": "The user's full name."
  245. },
  246. "picture": {
  247. "type": "string",
  248. "description": "URL of the user's picture image."
  249. },
  250. "verified_email": {
  251. "type": "boolean",
  252. "description": "Boolean flag which is true if the email address is verified. Always verified because we only return the user's primary email address.",
  253. "default": "true"
  254. }
  255. }
  256. },
  257. "X509": {
  258. "id": "X509",
  259. "type": "object",
  260. "additionalProperties": {
  261. "type": "string"
  262. }
  263. }
  264. },
  265. "methods": {
  266. "getCertForOpenIdConnect": {
  267. "id": "oauth2.getCertForOpenIdConnect",
  268. "path": "oauth2/v1/certs",
  269. "httpMethod": "GET",
  270. "response": {
  271. "$ref": "X509"
  272. }
  273. },
  274. "getCertForOpenIdConnectRaw": {
  275. "id": "oauth2.getCertForOpenIdConnectRaw",
  276. "path": "oauth2/v1/raw_public_keys",
  277. "httpMethod": "GET",
  278. "response": {
  279. "$ref": "Raw"
  280. }
  281. },
  282. "getRobotJwk": {
  283. "id": "oauth2.getRobotJwk",
  284. "path": "service_accounts/v1/jwk/{robotEmail}",
  285. "httpMethod": "GET",
  286. "parameters": {
  287. "robotEmail": {
  288. "type": "string",
  289. "description": "The email of robot account.",
  290. "required": true,
  291. "location": "path"
  292. }
  293. },
  294. "parameterOrder": [
  295. "robotEmail"
  296. ],
  297. "response": {
  298. "$ref": "Jwk"
  299. }
  300. },
  301. "getRobotMetadataRaw": {
  302. "id": "oauth2.getRobotMetadataRaw",
  303. "path": "service_accounts/v1/metadata/raw/{robotEmail}",
  304. "httpMethod": "GET",
  305. "parameters": {
  306. "robotEmail": {
  307. "type": "string",
  308. "description": "The email of robot account.",
  309. "required": true,
  310. "location": "path"
  311. }
  312. },
  313. "parameterOrder": [
  314. "robotEmail"
  315. ],
  316. "response": {
  317. "$ref": "Raw"
  318. }
  319. },
  320. "getRobotMetadataX509": {
  321. "id": "oauth2.getRobotMetadataX509",
  322. "path": "service_accounts/v1/metadata/x509/{robotEmail}",
  323. "httpMethod": "GET",
  324. "parameters": {
  325. "robotEmail": {
  326. "type": "string",
  327. "description": "The email of robot account.",
  328. "required": true,
  329. "location": "path"
  330. }
  331. },
  332. "parameterOrder": [
  333. "robotEmail"
  334. ],
  335. "response": {
  336. "$ref": "X509"
  337. }
  338. },
  339. "tokeninfo": {
  340. "id": "oauth2.tokeninfo",
  341. "path": "oauth2/v1/tokeninfo",
  342. "httpMethod": "POST",
  343. "description": "Get token info",
  344. "parameters": {
  345. "access_token": {
  346. "type": "string",
  347. "description": "The oauth2 access token",
  348. "location": "query"
  349. },
  350. "id_token": {
  351. "type": "string",
  352. "description": "The ID token",
  353. "location": "query"
  354. }
  355. },
  356. "response": {
  357. "$ref": "Tokeninfo"
  358. }
  359. }
  360. },
  361. "resources": {
  362. "userinfo": {
  363. "methods": {
  364. "get": {
  365. "id": "oauth2.userinfo.get",
  366. "path": "oauth2/v1/userinfo",
  367. "httpMethod": "GET",
  368. "description": "Get user info",
  369. "response": {
  370. "$ref": "Userinfoplus"
  371. },
  372. "scopes": [
  373. "https://www.googleapis.com/auth/plus.login",
  374. "https://www.googleapis.com/auth/plus.me",
  375. "https://www.googleapis.com/auth/userinfo.email",
  376. "https://www.googleapis.com/auth/userinfo.profile"
  377. ]
  378. }
  379. },
  380. "resources": {
  381. "v2": {
  382. "resources": {
  383. "me": {
  384. "methods": {
  385. "get": {
  386. "id": "oauth2.userinfo.v2.me.get",
  387. "path": "userinfo/v2/me",
  388. "httpMethod": "GET",
  389. "description": "Get user info",
  390. "response": {
  391. "$ref": "Userinfoplus"
  392. },
  393. "scopes": [
  394. "https://www.googleapis.com/auth/plus.login",
  395. "https://www.googleapis.com/auth/plus.me",
  396. "https://www.googleapis.com/auth/userinfo.email",
  397. "https://www.googleapis.com/auth/userinfo.profile"
  398. ]
  399. }
  400. }
  401. }
  402. }
  403. }
  404. }
  405. }
  406. }
  407. }