· 7 years ago · Nov 20, 2017, 07:40 AM
1{
2"swagger": "2.0",
3"info": {
4 "title": "Podio API",
5 "description": "Podio",
6 "version": "1.0.0"
7},
8"host": "api.podio.com",
9"schemes": [
10 "https"
11],
12"basePath": "",
13"produces": [
14 "application/json",
15 "application/x-www-form-urlencoded"
16],
17"consumes": [
18 "application/json",
19 "application/x-www-form-urlencoded"
20],
21"paths": {
22
23 "/oauth/token/" : {
24 "post" : {
25 "tags" : [ "OAuthorization" ],
26 "summary" : "Get access token",
27 "description" : "Gets a new access token for use when accessing the API.",
28 "produces" : [ "application/json" ],
29 "parameters" : [
30 {
31 "name": "body",
32 "description": "User definitions.",
33 "schema": {
34 "$ref": "#/definitions/PodioSchema"
35 },
36 "in": "body",
37 "required": true
38 } ],
39 "responses" : {
40 "200" : {
41 "description" : "Success",
42 "schema" : {
43 "type" : "object",
44 "properties" : {
45 "access_token" : {
46 "type" : "string",
47 "description" : "The created access token. This is currently 128 characters long"
48 },
49 "token_type" : {
50 "type" : "string",
51 "description" : "The type of token, currently always "bearer""
52 },
53 "expires_in" : {
54 "type" : "number",
55 "description" : "The number of seconds until the access token expires and cannot be used anymore"
56 },
57 "refresh_token" : {
58 "type" : "string",
59 "description" : "The refresh token to use when a new access token is required because the access token expires"
60 },
61 "ref" : {
62 "type" : "object",
63 "description" : "The reference to the entity logged in",
64 "properties" : {
65 "type" : {
66 "type" : "string",
67 "description" : "The type of the entity, either "user" or "app""
68 },
69 "id" : {
70 "type" : "number"
71 }
72 }
73 }
74 }
75 }
76 }
77 }
78 }
79 },
80},
81"definitions": {
82
83 "PodioSchema": {
84 "type": "object",
85 "properties": {
86 "grant_type": {
87 "type": "string",
88 "description": "grant_type"
89 },
90 "username": {
91 "type": "string",
92 "description": "username"
93 },
94 "password": {
95 "type": "string",
96 "description": "password"
97 },
98 "client_id": {
99 "type": "string",
100 "description": "client_id"
101 },
102 "client_secret": {
103 "type": "string",
104 "description": "client_secret"
105 }
106
107 }
108 },
109
110
111}
112
113curl -X POST "https://api.podio.com/oauth/token/" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "{ "grant_type": "string", "username": "string", "password": "string", "client_id": "string", "client_secret": "string"}"
114
115curl -X POST