unauthorized

How do I use client.send_file discord.py

霸气de小男生 提交于 2019-12-25 08:38:54
问题 @my_bot.command() async def memes(): await client.send_file(discord.Object(id='321332957690331138'),'1.jpg') I used that and I got error code 401 aka Unauthorized my_bot.run(TOKEN) I'm using that to login All my other commands work and do not output this error. -I'm quite new to this website so I may have done something wrong- 回答1: Your issue is that you need to pass a proper destination (channel in server) as the first parameter. To get the server object from a server ID you can use: server

Failed to load resource 401 unauthorized only with Safari

别说谁变了你拦得住时间么 提交于 2019-12-25 04:04:52
问题 I'm found an interesting problem in my app. I'm using Rails 3 with ruby 2.0. I already have a production server where my app is running and another staging server. I'm configuring a new better one but I have a problem only with Safari. Redirected to http://ip.server/ Completed 302 Found in 201.7ms (ActiveRecord: 0.0ms) Started GET "/" for my.ip at 2014-10-13 08:17:18 +0200 Processing by DashboardController#index as HTML Completed 401 Unauthorized in 1.2ms Started GET "/user/sign_in" for my.ip

Yammer Embed Feed works in IE and Firefox but not in Chrome, gives 401 unauthorized

北城以北 提交于 2019-12-25 02:59:17
问题 ode : <div id="embedded-feed" style="height: 99%; width: 100%; overflow: auto"></div> <script src="https://assets.yammer.com/assets/platform_embed.js"></script> <script>yam.connect.embedFeed({ container: "#embedded-feed", network: "tcs.com", feedType: "group", feedId: "all" }); </script> Code works fine in IE and FireFox but in Chrome gives 401 Unauthorized Console Error : GET https://www.yammer.com/tr8n/api/v1/language/translate?batch=true&source=yamjs 401 (Unauthorized) However opening the

wget to download image, link get truncated

妖精的绣舞 提交于 2019-12-25 02:22:34
问题 I have an IP camera and the link below takes a snap shot and show you the picture in your broswer: http://192.168.5.10:81/snapshot.cgi?user=admin&pwd=888888 I am trying to write a script, using wget to download a snap shot to my local repeatably after a certain period. However, when i use wget -m -p -k http://192.168.5.10:81/snapshot.cgi?user=admin&pwd=888888 I get the following respond: => `192.168.5.10:81/snapshot.cgi?user=admin' Connecting to 192.168.5.10:81... connected. HTTP request sent

Issue with SignalR core and cross domain requests

余生颓废 提交于 2019-12-22 10:43:52
问题 We are using SignalR core with CORS cross domain requests. The client is unable to connect to server. 401 Unauthorized No Access-Control-Allow-Origin' header is present on the requested resource. Error: Failed to start the connection. Note we are using the most recent signalr core (alpha version for asp.net core 2.0). Please note within the same client app, i'm able to access CORS Web API methods. It's isolated to SignalR hub/client. We are using Windows authentication in IIS. Anonymous seems

handle 401 unauthorized error on windows Phone with Phonegap

ⅰ亾dé卋堺 提交于 2019-12-22 10:37:54
问题 I'm creating an application with phonegap on windows phone 7, that need an authentification on a server. When we log with the correct username and password, we got a 200 status. And everything works. But if we make a mistake on the login or the password, the server send us back a 401 error. This freeze my application. I need to kill it and restart it. So not very practice. I check the response with fiddler on my computer and the phone receive the 401 error, and I manage this error on my code.

ASP.Net MVC 3 Redirect UnAuthorized User not to loginUrl

送分小仙女□ 提交于 2019-12-18 10:28:54
问题 i have a project using ASP.Net MVC3 and using membership for roles. i use authorize in every controller. eg: [Authorize(Roles = "Administrator")] public ActionResult Index(string q, int i) { return View(model); } if someone doesnt have role for administrator, then it will redirect to login page by default. how to change it,so it will redirect into Views/Shared/UnAuthorize.cshtml ? or maybe if someone doesnt have role for administrator, it will show message box (alert) ? thanks in advance. 回答1

Unauthorized when calling Google GCM

天大地大妈咪最大 提交于 2019-12-17 19:25:15
问题 I trying to use Google GCM for sending push notifications. But get a WebException that says that the remote server returns 401 unautorized. I can't foung why it doen't work. Anyone that knows why it doesn't work? Here is my code: ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(ValidateServerCertificate); HttpWebRequest Request = (HttpWebRequest)WebRequest.Create("https://android.googleapis.com/gcm/send"); Request.Method = "POST"; Request

MVC6 Prevent Redirect on unauthorized

谁说胖子不能爱 提交于 2019-12-13 19:25:07
问题 I'm developing an ASP.NET MVC 6 Web API app, with AngularJs frontend. When I leave a session to decade, or I'm trying to call a Web API action unauthorized, I expect to receive a 401 status code. Instead, I get a 302, and tries to redirect to the default path for login ("/Account/Login"). So I need to handle this in Angular. From other forum posts here and googling I found that some people resolved their problems using in startup.cs: services.Configure<CookieAuthenticationOptions>(options =>

GoogleCloudMessaging Unauthorized Error 401

非 Y 不嫁゛ 提交于 2019-12-13 03:56:17
问题 I try to create project with use GoogleCloudMessaging to recieve push - notifications from my remote server. For client i use google tutorial Implementing GCM Client. For server i use this realization on php, but after i started php script, i got an error: Unauthorized Error 401 Here is my php code: $url = 'https://android.googleapis.com/gcm/send'; $serverApiKey = "778688687533"; // sender id (Project Number) $reg = "APA91bFFWLYsX8TK_XiGQJeUkHb_7FJZwZBSdnNEdxzQEQ-ijpmVvwBPxaz3wQPmWy_K6YAIYt1x