Post

1 follower Follow
0
Avatar

Making the post request to obtain API token

Hi all,

Having a little trouble getting this post request to return anything. I was wondering if you could give me a hand. It may even been a PHP problem:

Here is the code:  http://pastebin.com/84QG8rf6

It has access granted and the code is returned: $this->code

I'm now building a request with all of the parameters in mind in order to get the token: 

URL: https://podio.com/oauth/token*Request body: grant_type=authorization_code&client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&client_secret=YOUR_APP_SECRET&code=THE_AUTHORIZATION_CODE*

$result comes back empty.

Any ideas? :)

James Trusler Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Hi James,

You're making things much harder than you need to. We have a PHP client that you can use so you don't have to deal with the HTTP requests directly.

Read about the client and download from: https://developers.podio.com/clients/php 

The download comes with two complete authentication examples in the /examples/ folder that you can build from.

Andreas Haugstrup Pedersen 0 votes
0
Avatar

Hahah, my profile picture *sighs*... Does this app make my chin look big? .. hahaha!

James Trusler 0 votes