Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage oauth2 #48

Open
fbosman opened this issue Jan 8, 2024 · 2 comments
Open

Usage oauth2 #48

fbosman opened this issue Jan 8, 2024 · 2 comments

Comments

@fbosman
Copy link

fbosman commented Jan 8, 2024

Has anyone succeeded in using oauth2 with sumup and is he/she willing to share the process and code?

@fbosman
Copy link
Author

fbosman commented Jun 18, 2024

No one uses this?

@Manaf941
Copy link

Manaf941 commented Aug 7, 2024

Follow this guide: https://developer.sumup.com/online-payments/introduction/authorization#o-auth-2-0

The required scopes are transactions.history user.app-settings user.profile_readonly payments

use the access_token in the loginWithToken function.

Example code in JavaScript (NodeJS) to generate a login url:

const crypto = require("crypto")

const state = crypto.randomUUID()
const query = new URLSearchParams({
    response_type: "code",
    client_id: "your_sumup_client_id",
    redirect_uri: "https://example.com/return/url/for/authorization",
    scope: "transactions.history user.app-settings user.profile_readonly payments",
    state: state
})

const url = `https://api.sumup.com/authorize?${query}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants