Post

2 followers Follow
0
Avatar

Cannot authenticate by app id

I can't get access token by app id, in last days. Request /oauth/token competed with error - Invalid JSON.
How can I solve this issue?

HTTP request:

POST /oauth/token HTTP/1.1 
User-Agent: Podio PHP Client/4.3.0
Host: api.podio.com
Accept: application/json
Content-type: application/x-public_html-form-urlencoded
Content-Length: 169
grant_type=app&app_id=...&app_token=...&client_id=...&client_secret=...

HTTP response:

HTTP/1.1 400 Bad Request 
Server: nginx
Date: Wed, 27 Jan 2016 20:25:11 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 217
Connection: keep-alive
X-Podio-Request-Id: akv7MSnc
{"error_parameters":{},"error_detail":null,"error_propagate":false,"request":"url":"http:\/\/api.podio.com\/oauth\/token","query_string":"","method":"POST"},"error_description":"Invalid JSON","error":"invalid_value"}

 

I use podio/podio-php:4.3 to communicate with API server.

Null

Please sign in to leave a comment.

2 comments

0
Avatar

Hi there,

You're setting the Content-Type of your request body to

Content-type: application/x-public_html-form-urlencoded 

It should be 

Content-type: application/x-www-form-urlencoded

Cheers,

Brian

Brian Stengaard 0 votes