Click here to Skip to main content
15,916,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
https://developers.credly.com/getting-started

I'm trying to do what is being stated on "Get familiar with authentication"

I'm still getting a 401 error after trying my code below. All I ever wanted is to make it work. My username and password is working properly and I read the everything stated on this site for Authorization field. Please help

https://en.wikipedia.org/wiki/Basic_access_authentication#Protocol

What I have tried:

string encoded = Convert.ToBase64String(Encoding.GetEncoding("ISO-8859-1").GetBytes(email_address + ":" + password));

                    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(end_Point);
                    request.Headers.Add("X-Api-Key", credly_api_key);
                    request.Headers.Add("X-Api-Secret", credly_app_key);
                    request.Headers.Add("Authorization", "Basic " + encoded);
Posted
Updated 25-Jul-18 0:53am
v4
Comments
ZurdoDev 24-Jul-18 8:09am    
There is no way for any of us to help you. We have no idea what site you are trying to post to or what the value of email_address or password is.

What do you actually expect any of us to do?
LaysAndNetflix 24-Jul-18 16:02pm    
https://developers.credly.com/getting-started

I'm trying to do what is being stated on "Get familiar with authentication"

401 indicates unauthorized access. In other words, you are trying to access a resource that requires authentication but the credentials you supplied was invalid. Please verify that you are using the correct email and password, and verify they were valid and registered.

Also, there maybe some here who knows about credly integration, but I think you get a better chance of getting answers to your issue when contacting their support team. Customer Feedback for Credly[^]
 
Share this answer
 
Is the server IIS?

Is Anonymous authentication turned OFF? (Even if the other forms of auth are turned on, if Anonymous is also there, it will try that.)

(I have neither VS, nor a web server here to test if I know what I'm talking about. But I'be run into similar problems in the past.)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900