question

thedangler avatar image
thedangler asked thedangler commented

Unauthorized when Refreshing Access Token

Hello, When ever I try to refresh a token I get unauthorized. I've logged back into my application and all tokens were updated. I waiting until the access token expired and tried running a script to generate a new access token

        $response = Http::post("https://apisandbox.dev.clover.com/oauth/v2/refresh",[
            'client_id'=>env('CLOVER_APP_ID'),
            'refresh_token'=> $token->refresh_token,
        ]);
				

it always returns unauthorized. Refresh token expires next year. Access token expired 1 hour ago. Not sure what I'm doing wrong.

REST APIOAuth
5 comments
10 |2000

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

parquet76 avatar image parquet76 commented ·

I haven't used php in many, many years but it looks like you are passing an array in the post body. Is that right? If so, that's not correct, https://docs.clover.com/docs/refresh-access-tokens. Generally you should try requests out with curl/postman, then write your code.

0 Likes 0 ·
thedangler avatar image thedangler parquet76 commented ·
That posts a json body,

And I'm trying it with bruo and still getting unauthorized, invalid request token.
No idea how its invalid. I made it on Friday it expires in a year.


0 Likes 0 ·
thedangler avatar image thedangler parquet76 commented ·
I'm not sure but I think the expired time on the refresh tokens is incorrect.

I'm successfully using refresh request. however if its longer then 72 hours it doesn't work.
The documentation should say how long it expires.


0 Likes 0 ·
hivutoco avatar image hivutoco commented ·

Anti-wrinkle serums are designed to target specific areas where wrinkles are most prominent, such as around the eyes how to use vitamin c serum on face at night mouth, and forehead. This targeted approach allows for more effective treatment compared to general moisturizers.

0 Likes 0 ·
hivutoco avatar image hivutoco commented ·

I found a lovely studio apartment that's perfect for my needs. Despite being a studio, the clever use of space makes it feel cozy yet functional. The apartments for rent somerset nj apartment features high ceilings and large windows, allowing plenty of natural light to flood in.

0 Likes 0 ·

0 Answers

·

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