question

Komsan Jongboonwattana avatar image
Komsan Jongboonwattana asked kabnetic answered

Get the 415 Error when request an access and refresh token pair.

I am trying to get new access_token and refresh_token pair in OAuth2.0 through Postman and keep getting this error.

"status":415,"error":"Unsupported Media Type","message":"Content type 'application/x-www-form-urlencoded' not supported","path":"/auth-token/oauth/v2/token"

Here are the URLs that use for the request.

Callback URL: https://oauth.pstmn.io/v1/callback

Auth URL: https://sandbox.dev.clover.com/oauth/v2/authorize

Access Token URL: https://apisandbox.dev.clover.com/oauth/v2/token

What should I do to fix the error?

OAuthaccess token
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bryanvargas avatar image
bryanvargas answered tonyadams edited

This is one of our comment status error codes. Your format is incorrect. https://docs.clover.com/docs/status-code-and-error-reference#status-codes


The header needs to be:

--header 'content-type: application/json'

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

kabnetic avatar image
kabnetic answered

Hello I am having an issue here as well with the same error. How do I do this in Postman when I am setting up Authorization, as there is no headers option to modify in the request.

Also why is the content type application/json, as all the other OAuth providers are using the x-www-form-urlencoded format?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community