podio / podio-rb

The official Ruby wrapper for the Podio API used and maintained by the Podio team
https://podio.com
MIT License
66 stars 53 forks source link

Documentation inconsistencies regarding Content-Type for authenticate_with_app #94

Open bladerunnn opened 8 months ago

bladerunnn commented 8 months ago

The podio documentation here: https://developers.podio.com/authentication/app_auth outlines the POST:

HTTP METHOD: POST URL: https://api.podio.com/oauth/token/v2 HEADER: "Content-Type: application/json" BODY: { "grant_type": "app", "app_id": YOUR_PODIO_APP_ID, "app_token": YOUR_PODIO_APP_TOKEN, "client_id": YOUR_CLIENT_ID, "redirect_uri": YOUR_URL, "client_secret": YOUR_CLIENT_SECRET }

However the the podio ruby client found here: https://github.com/podio/podio-rb/blob/master/lib/podio/client.rb#L96 uses req.headers['Content-Type'] = 'application/x-www-form-urlencoded'.