question

Komsan Jongboonwattana avatar image
Komsan Jongboonwattana asked tonyadams edited

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.

1 Answer

·
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.

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