question

jonathanci avatar image
jonathanci asked ·

Cors Missing Allow Origin

When trying to pair my devkit flex2 i get Cors Missing Allow Origin 401 unauthorized

I created a rest app in sandbox developer portal, that i installed my app to my test merchant. The redirect uri is set to http://localhost:3000 and the cors is set to http://localhost:3000 with Default Oauth response to token (testing only) to test.

all that well configured like said in

https://docs.clover.com/docs/using-oauth-20#

and

https://docs.clover.com/docs/using-cors#

When i click on the ExampleOauthRequest, like said in the doc, I get the redirection with all the right information and the access_token. But it don't work because it gets an 401 unauthorize CORS Missing Allow Origin.

1623199576842.png

semi-integrations
1623199576842.png (51.2 KiB)
10 |2000 characters needed characters left characters exceeded

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

David Marginian avatar image
David Marginian answered ·

Merchant read is required for Remote Pay Cloud. Add merchant read, uninstall and reinstall your app and then obtain a new access token.

10 |2000 characters needed characters left characters exceeded

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

David Marginian avatar image
David Marginian answered ·

What do you mean by "pair my devkit flex2"? It sounds like you are just trying to obtain an access token? Have you already installed your app on your test merchant?

4 comments
10 |2000 characters needed characters left characters exceeded

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

no, the link get the token and then when i login and choose my merchant I do get the access token.

then I get redirected to my webapp at localhost:3000{with all the parameters here automatically included as url params, including the accesstoken retreived}

then I use the information to pair my flex2 devkit with the acces token with remote-pay. the try pairing connection return 401 unauthorized CORS Missing

I sent you a screenshot in private, I use your remote-pay-example app. and the app works well if i use a generated accesstoken but not with this accesstoken that i get from the oauth flow.

0 Likes 0 ·

What permissions does your app have?

0 Likes 0 ·
jonathanci avatar image jonathanci David Marginian ♦♦ ·

I only have Ecommerce For processing payments online Enable online payments

0 Likes 0 ·
Show more comments

Welcome to the
Clover Developer Community