signnow / SignNow.NET

SignNow.Net is the official .NET 4.5+ and .NET Standard class library for the SignNow API. SignNow allows you to embed legally-binding e-signatures into your app, CRM or cloud storage. Send documents for signature directly from your website. Invite multiple signers to finalize contracts.
https://www.signnow.com/developers
MIT License
16 stars 12 forks source link

Error getting token #89

Closed dMiracleMan closed 4 years ago

dMiracleMan commented 4 years ago

I'm getting error when trying to connect to the demo api.

Here is my code

string clientId = ConfigurationManager.AppSettings["SignNowClientId"].ToString(); string clientSecret = ConfigurationManager.AppSettings["SignNowClientSecret"].ToString(); string SignNowUser = ConfigurationManager.AppSettings["SignNowUser"].ToString(); string SignNowPass = ConfigurationManager.AppSettings["SignNowPass"].ToString(); string SignNowApiPath = ConfigurationManager.AppSettings["SignNowAPIPath"].ToString();

        Uri apiPath = new Uri(SignNowApiPath);
        // init OAuth2 service
        var oauth = new OAuth2Service(apiPath, clientId, clientSecret);
        // Token retrieval
        var token = oauth.GetTokenAsync(SignNowUser, SignNowPass,Scope.User).Result;

Capture

AlexNDRmac commented 4 years ago

Hi @dMiracleMan As I see on your screenshot, you are using Windows... What version of SignNow.Net SDK do you use and what version of .Net Framework?

dMiracleMan commented 4 years ago

.net framework 4.7.2 signnow.net 0.5.0-beta

AlexNDRmac commented 4 years ago

Pls check if you proper set values into your application configuration. Also, check for proper sandbox Url: https://api-eval.signnow.com, because Not found error message more related to some issue with Url.

AlexNDRmac commented 4 years ago

Please try to check if you can obtain token with your credentials using simple Curl from API reference Also, I need some small code sample from you to reproduce the same possible issue with token retrieval.

dMiracleMan commented 4 years ago

I had an error in the URL, but with the url fixed, now I get the following error:

image

dMiracleMan commented 4 years ago

I had an error in the client Id also.

AlexNDRmac commented 4 years ago

This is because smth wrong with your SignNowPass or/and clientId

dMiracleMan commented 4 years ago

working now. thank

dMiracleMan commented 4 years ago

Thanks