· 7 years ago · Nov 17, 2017, 09:00 AM
1{
2"swagger": "2.0",
3"info": {
4"title": "podio API",
5"description": "Move your app forward with the podio API",
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"paths": {
18
19 "/oauth/token/" : {
20 "post" : {
21 "tags" : [ "OAuthorization" ],
22 "summary" : "Get access token",
23 "description" : "Gets a new access token for use when accessing the API.",
24 "produces" : [ "application/json" ],
25 "parameters" : [
26 {
27 "name" : "grant_type",
28 "in" : "query",
29 "required" : true,
30 "type" : "string",
31 "description" : "grant_type"
32 },
33 {
34 "name" : "username",
35 "in" : "query",
36 "required" : true,
37 "type" : "string",
38 "description" : "username"
39 },
40 {
41 "name" : "password",
42 "in" : "query",
43 "required" : true,
44 "type" : "string",
45 "description" : "password"
46 },
47 {
48 "name" : "client_id",
49 "in" : "query",
50 "required" : true,
51 "type" : "string",
52 "description" : "The key of the API client"
53 }, {
54 "name" : "client_secret",
55 "in" : "query",
56 "required" : true,
57 "type" : "string",
58 "description" : "The secret of the client. This will be generated by Podio and can be acquired in the API key area in Podio."
59 } ],
60 "responses" : {
61 "200" : {
62 "description" : "Success",
63 "schema" : {
64 "type" : "object",
65 "properties" : {
66 "access_token" : {
67 "type" : "string",
68 "description" : "The created access token. This is currently 128 characters long"
69 },
70 "token_type" : {
71 "type" : "string",
72 "description" : "The type of token, currently always "bearer""
73 },
74 "expires_in" : {
75 "type" : "number",
76 "description" : "The number of seconds until the access token expires and cannot be used anymore"
77 },
78 "refresh_token" : {
79 "type" : "string",
80 "description" : "The refresh token to use when a new access token is required because the access token expires"
81 },
82 "ref" : {
83 "type" : "object",
84 "description" : "The reference to the entity logged in",
85 "properties" : {
86 "type" : {
87 "type" : "string",
88 "description" : "The type of the entity, either "user" or "app""
89 },
90 "id" : {
91 "type" : "number"
92 }
93 }
94 }
95 }
96 }
97 }
98 }
99 }
100 }
101}
102}
103
104{ "error": { "code": 400, "context": null, "message": "{"error_parameters":[],"error_detail":null,"error_propagate":false,"request":{"url":"http:\/\/api.podio.com\/oauth\/token","query_string":"grant_type=password&username=testacc&password=test&client_id=test-app&client_secret=test&redirect_uri=testurl","method":"POST"},"error_description":"Invalid value [\"password\", \"password\"] (array): must be string","error":"invalid_value"}"