question

futoricky avatar image
futoricky asked blockbench answered

Unable to migrate legacy tokens.

Hi,

I'm trying to migrare my users to the new oauth 2 tokens, but when I send the post request to /oauth/token/migrate_v2 with the payload I only get a 204 response with no data.

Request code (Ruby on Rails):

      client_id =  ENV['CLOVER_APP_ID']
      client_secret = ENV['CLOVER_APP_SECRET']

      migrate_url = "#{ENV['CLOVER_URL']}/oauth/token/migrate_v2"

      response = RestClient.post(
        migrate_url, 
        {
          "merchant_uuid": clover_sync.merchant_id,
          "app_uuid": client_id,
          "auth_token": clover_sync.access_token
        }.to_json, 
        {
          "Content-Type": "application/json", 
          "Accept": "application/json"
        }
      )
REST APIOAuthaccess 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

·
blockbench avatar image
blockbench answered

A 204 No Content response means the request was successful but returns no data. Ensure the legacy tokens are valid for migration, check if the Clover API intentionally returns 204 for this endpoint, and verify that your client_id and client_secret have the correct permissions. Also, confirm the request headers and payload are correctly formatted. If the issue persists, review Clover’s logs or contact their support for further assistance.

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