square / square-nodejs-sdk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

oauth2 token to list payments

lukasa1993 opened this issue · comments

hello, i am trying to list payments with token i get from outh2 but it returns

The `Authorization` http header of your request was incorrect or expired. The header value is expected to be of the format "Bearer TOKEN" (without quotation marks), where TOKEN is a valid access token (e.g. "Bearer ABC123def456GHI789jkl0"). For more information, see https://developer.squareup.com/docs/build-basics/using-rest-api#__set-the-headers__ .

these are scopes i am asking

"MERCHANT_PROFILE_READ", "CUSTOMERS_READ", "MERCHANT_PROFILE_READ", "BANK_ACCOUNTS_READ", "ITEMS_READ", "INVENTORY_READ", "PAYMENTS_WRITE", "PAYMENTS_READ", "PAYMENTS_WRITE_ADDITIONAL_RECIPIENTS", "PAYMENTS_WRITE_IN_PERSON", "INVOICES_READ", "INVOICES_WRITE", "PAYMENTS_WRITE_SHARED_ONFILE", "ORDERS_READ", "ORDERS_WRITE"

is it possible to query someone elses square accounts payments also to make them ? or its only for self ? because if i use self key it works

hi @lukasa1993,

Are you still having issues with this?

PAYMENTS_READ is the correct permission to request, and looks like it's in your scopes.

My guess is that this issue is a configuration error. Checkout this post on our developer forums, it might be helpful 😄

In the future we also suggest that you post questions on the forums instead of as github issues, as questions on our forums will get a response from a Square employee within 48 hours.

project i used this on is dead now so i have no idea don't even remember what this was :( we can close this if no one else has issue

@lukasa1993 Thanks for letting us know!

I will go ahead and close this issue for now, but if anyone in the community stumbles across this and has more details they can share, please re-open with that information.

Cheers!