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

Is there a way to verify API credentials via test API call? #158

Closed
dmitrypol opened this Issue Oct 9, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@dmitrypol

dmitrypol commented Oct 9, 2015

We have a platform where multiple customers have different PayPal credentials. They enter them into our system but it would be nice to ping PayPal API and verify that credentials are correct.

@ppmtscory

This comment has been minimized.

Show comment
Hide comment
@ppmtscory

ppmtscory Oct 19, 2015

@dmitrypol are you referring to the classic API credentials of username, password, signature/certificate or are you referring to the REST credentials of client ID and secret?

ppmtscory commented Oct 19, 2015

@dmitrypol are you referring to the classic API credentials of username, password, signature/certificate or are you referring to the REST credentials of client ID and secret?

@dmitrypol

This comment has been minimized.

Show comment
Hide comment
@dmitrypol

dmitrypol Oct 19, 2015

Sorry, REST API.

dmitrypol commented Oct 19, 2015

Sorry, REST API.

@ppmtscory

This comment has been minimized.

Show comment
Hide comment
@ppmtscory

ppmtscory Oct 19, 2015

You could do an immediate call to generate an access token....

curl -v https://api.sandbox.paypal.com/v1/oauth2/token \
 -H "Accept: application/json" \
 -H "Accept-Language: en_US" \
 -u "clientID:clientSecret" \
 -d "grant_type=client_credentials"

If the credentials are not valid, then you should get an error stating as such. If the access token is created, then they've entered valid credentials.

ppmtscory commented Oct 19, 2015

You could do an immediate call to generate an access token....

curl -v https://api.sandbox.paypal.com/v1/oauth2/token \
 -H "Accept: application/json" \
 -H "Accept-Language: en_US" \
 -u "clientID:clientSecret" \
 -d "grant_type=client_credentials"

If the credentials are not valid, then you should get an error stating as such. If the access token is created, then they've entered valid credentials.

@dmitrypol

This comment has been minimized.

Show comment
Hide comment
@dmitrypol

dmitrypol Oct 19, 2015

sorry for the silly question but how would I do that via the PayPal-Ruby-SDK? I don't want to create future payment or use any OpenID stuff. Thank you again for your help.

dmitrypol commented Oct 19, 2015

sorry for the silly question but how would I do that via the PayPal-Ruby-SDK? I don't want to create future payment or use any OpenID stuff. Thank you again for your help.

@ppmtscory

This comment has been minimized.

Show comment
Hide comment
@ppmtscory

ppmtscory Oct 19, 2015

You should be able to call methods here to set the credentials and then the method here can be used to create an access token.

ppmtscory commented Oct 19, 2015

You should be able to call methods here to set the credentials and then the method here can be used to create an access token.

@ppmtscory ppmtscory closed this Oct 26, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment