I want to set .config.inc.php of MarketplaceWebServiceOrders library that I used to access order of amazon seller account.
Here is my config.inc.php file setting
/************************************************************************
* REQUIRED
*
* All MWS requests must contain a User-Agent header. The application
* name and version defined below are used in creating this value.
***********************************************************************/
define('APPLICATION_NAME', 'MarketplaceWebServiceOrders');
define('APPLICATION_VERSION', '2013-09-01');
After figure out these setting I got error
Caught Exception: Resource / is not found on this server. API Section is missing or you have provided an invalid operation name. Response Status Code: 404 Error Code: InvalidAddress Error Type: Sender Request ID: 47e5f613-5913-48bb-ac9e-cb00871b36af XML: Sender InvalidAddress Resource / is not found on this server. API Section is missing or you have provided an invalid operation name. 47e5f613-5913-48bb-ac9e-cb00871b36af ResponseHeaderMetadata: RequestId: 47e5f613-5913-48bb-ac9e-cb00871b36af, ResponseContext: 6qut/Q5rGI/7Wa0eutUnNK1+b/1rvHSojYBvlGThEd1wAGdfEtnpP2vbs28T0GNpF9uG82O0/9kq 93XeUIb9Tw==, Timestamp: 2015-09-15T12:47:19.924Z, Quota Max: , Quota Remaining: , Quota Resets At:
Here GetOrderSample.php file code for service url. Which I have done already.
// More endpoints are listed in the MWS Developer Guide
// North America:
$serviceUrl = "https://mws.amazonservices.com/Orders/2013-09-01";
// Europe
//$serviceUrl = "https://mws-eu.amazonservices.com/Orders/2013-09-01";
// Japan
//$serviceUrl = "https://mws.amazonservices.jp/Orders/2013-09-01";
// China
//$serviceUrl = "https://mws.amazonservices.com.cn/Orders/2013-09-01";
$config = array (
'ServiceURL' => $serviceUrl,
'ProxyHost' => null,
'ProxyPort' => -1,
'ProxyUsername' => null,
'ProxyPassword' => null,
'MaxErrorRetry' => 3,
);
$service = new MarketplaceWebServiceOrders_Client(
AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY,
APPLICATION_NAME,
APPLICATION_VERSION,
$config);
Caught Exception: Resource / is not found on this server.
This is telling you that the problem is with the path. It's not being able to find that.
Are you sure that the class you're trying to use is in the right path? Most classes that you need to run the samples are in the "Model" folder.
I mean to say, if you take the sample out of the sample folder and put it elsewhere, it won't be able to find classes in the "Model" folder.
An easy fix to test it is to put everything you downloaded from the MWS site into your web directory and just edit the config file. It should work that way.
I'm not a php guy, but I don't see where you're setting up the access keys, merchant id, marketplace id, and most importantly the serviceURL. The 404 error is the first clue meaning it can't find the service. Download the PHP client library which has everything you need to get started.
Related
I have a Kubernetes cluster with kube-prometheus-stack (which includes Grafana) deployed via Helm. I am trying to set up single sign on (SSO) to Grafana using AzureAD. I've found the Grafana configuration pages (https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-grafana and https://grafana.com/docs/grafana/v9.0/setup-grafana/configure-security/configure-authentication/azuread/) and I think I have an initial idea of what I need to add to my Helm chart's values.yaml file.
There are some details, however, that I am not sure about. If I had access to the "schema" for this configuration, that might help me figure this out. Unfortunately, I have been unable to find anything that defines this. There are examples, but I cannot find anything that describes what the fields mean. Also, keep in mind that everything I have found shows examples for the grafana.ini file. I need to "translate" this to YAML for the values.yaml file used by the Helm chart.
Here is an example:
...
[auth.azuread]
name = Azure AD
enabled = true
allow_sign_up = true
client_id = APPLICATION_ID
client_secret = CLIENT_SECRET
scopes = openid email profile
auth_url = https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/authorize
token_url = https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/token
allowed_domains =
allowed_groups =
role_attribute_strict = false
I have translated this into the following YAML:
auth.azuread:
name: Azure AD
enabled: true
allow_sign_up: true
client_id: APPLICATION_ID
client_secret: CLIENT_SECRET
scopes: openid email profile
auth_url: https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/authorize
token_url: https://login.microsoftonline.com/TENANT_ID/oauth2/v2.0/token
allowed_domains:
allowed_groups:
role_attribute_strict: false
I suspect that scopes expects a list based on its plurality, but how can I be sure? Also, what are the valid values? Apparently openid, email and profile are valid, but what do these values represent and are there others? On a similar note, what do allowed_domains and allowed_groups expect?
I've tried to find a reference for the Grafana configuration data structure and definition, but have not had any luck. Does anyone have an idea where (if) this can be found?
I successfully installed and ran a couple of circuits on a backend the other day (essex).
Everything was ok, results came up, but the next day, once I wanted more QC, I could not manage to get a provider.
I have looked into my account (active), looked into the package (up-to-date), and a new file in the project. I also already disabled and enabled the account without problems, but I keep having this error.
Code
from qiskit import IBMQ
IBMQ.active_account()
IBMQ.providers()
provider = IBMQ.get_provider(hub='ibm-q', group='open', project='main')
and I get:
>~/my_environment_name/lib/python3.7/site-packages/qiskit/providers/ibmq/ibmqfactory.py in get_provider(self, hub, group, project)
425 raise IBMQProviderError('No provider matches the specified criteria: '
426 'hub = {}, group = {}, project = {}'
--> 427 .format(hub, group, project))
428 if len(providers) > 1:
429 raise IBMQProviderError('More than one provider matches the specified criteria.'
IBMQProviderError: 'No provider matches the specified criteria: hub = ibm-q, group = open, project = main'
I would like to know where I am wrong, I look forward to keep learning thru the backends efficiently.
Thank you in advance
This means that there is no provider that matches all the criteria you specified, so in that hub, group and project. This could be because your account hasn't loaded correctly, so check to see if anything is returned from IBMQ.providers(). If there isn't anything load your account using IBMQ.load_account(). The other issue could be that there are genuinely no backends that meet those criteria, so try running IBMQ.get_provider() instead.
Try to use API token to enable your IBMQ account.
from qiskit import IBMQ
provider = IBMQ.enable_account("your-api-key") # We load our account
provider.backends() # We retrieve the backends to check their status
for b in provider.backends():
print(b.status().to_dict())
Create IBM Quantum account if you don't have one, then use the API token that available in the dashboard as enable_account() method argument to resolve this issue.
For More: https://quantum-computing.ibm.com/lab/docs/iql/manage/account/ibmq
https://quantum-computing.ibm.com/
https://www.ibm.com/account/reg/us-en/signup?formid=urx-19776&target=https%3A%2F%2Flogin.ibm.com%2Foidc%2Fendpoint%2Fdefault%2Fauthorize%3FqsId%3D70b061b4-7c64-4545-a504-a8871f2d414f%26client_id%3DN2UwMWNkYmMtZjc3YS00
i'm using the v1-master branch of the PHP API Client library from here:
https://github.com/google/google-api-php-client/blob/v1-master/src/Google/Service/Pubsub.php
i'm sure i have all the OAuth stuff right, so assume the $client is already created correctly... also {my-app-id} is replaced with my real application id
$pubsub = new Google_Service_Pubsub($client);
$new_topic = new Google_Service_Pubsub_Topic();
$new_topic->setName('projects/{my-app-id}/topics/mytopic');
$topic = $pubsub->topics->create($new_topic);
this throws an exception:
exception: Google_Service_Exception Object
(
[errors:protected] => Array
(
[0] => Array
(
[domain] => global
[reason] => invalidArgument
[message] => Invalid resource name given (name=projects/{my-app-id}/topics/mytopic). Refer to https://cloud.google.com/pubsub/overview#names for more information.
)
)
{my-app-id} is just letters a-z, so it is valid and meets all the criteria on the pubsub overview, and i do have rights to the project because if i change the {my-app-id} value, i get a permission denied message.
i've also gone through the API Explorer and got similar broken results:
REQUEST:
PUT https://pubsub.googleapis.com/v1/projects/{my-app-id}/topics/mytopic?key={YOUR_API_KEY}
{
}
RESPONSE:
404 OK
- Show headers -
{
"error": {
"code": 404,
"message": "Requested entity was not found.",
"status": "NOT_FOUND"
}
}
i've also tried using the master branch of the API client and changing the endpoints to the pubsub.googleapis.com/v1 endpoints rather than www.googleapis.com/pubsub/v1beta1... i even tried v1beta2. nothing is working.
the PubSub API is enabled for my project, but i can't get any topics created.
does anyone have any PHP sample code of a working app to use the PubSub service? any ideas what i'm doing wrong?
If the API Explorer is also not working, that would indicate that the project id you are specifying in place of {my-app-id} is not correct. It should be a project that has already been created. Visit https://console.developers.google.com/home/dashboard?project={my-app-id} and ensure that you get a dashboard for your project. If not, then that would confirm that the project id is incorrect.
I am using iOS 6 Social framework for accessing user's Facebook data. I am trying to get likes of the current user within my app using ACAccount and SLRequest. I have a valid Facebook account reference of type ACAccount named facebook, and I'm trying to get user's likes this way:
SLRequest *req = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:url parameters:nil];
req.account = facebook;
[req performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
//my handler code.
}
where url is #"https://graph.facebook.com/me/likes?fields=name"; In my handler, I'm getting this response:
{
error = {
code = 2500;
message = "An active access token must be used to query information about the current user.";
type = OAuthException;
};
}
Shouldn't access tokens be handled by the framework? I've found a similar post Querying Facebook user data through new iOS6 social framework but it doesn't make sense to hard-code an access token parameter into the URL, as logically the access token/login checking should be handled automatically by the framework. In all examples that I've seen around no one plays with an access token manually:
http://damir.me/posts/facebook-authentication-in-ios-6
iOS 6 Facebook posting procedure ends up with "remote_app_id does not match stored id" error
etc.
I am using the iOS6-only approach with the built in Social framework, and I'm not using the Facebook SDK. Am I missing something?
Thanks,
Can.
You need to keep a strong reference to the ACAccountStore that the account comes from. If the store gets deallocated, it looks like it causes this problem.
Try running on an actual device instead of a simulator. This worked for me.
Ensure that your bundle id is input into your Facebook app's configuration. You might have a different bundle id for your dev/debug build.
I am developing an application for Windows Phone 7. I am trying to use services which are provided by the web site I am trying to get information from. I am using an asynchronous request. So if I try to get information from a web site without any authentication I use this code:
EventSrv.EventSrvSoapClient client = new EventSrv.EventSrvSoapClient();
client.GetAppointmentsAsync();
client.GetAppointmentsCompleted += new EventHandler<EventSrv.GetAppointmentsCompletedEventArgs>(events_completed);
and it works fine. But as soon as I want to use a service from a web site which requires authentication I get a
CommunicationException: _innerException:"Server returned an error: Not Found"
at
public L2P.DocumentsService.GetDocumentsResponse EndGetDocuments(System.IAsyncResult result)
{
object[] _args = new object[0];
//Between this line
L2P.DocumentsService.GetDocumentsResponse _result = ((L2P.DocumentsService.GetDocumentsResponse)(base.EndInvoke("GetDocuments", _args, result)));
//and this line
return _result;
}
I am passing the credentials the following way:
DocumentsService.BaseServiceSoapClient docClient = new DocumentsService.BaseServiceSoapClient();
docClient.ClientCredentials.UserName.UserName = Variables.username;
docClient.ClientCredentials.UserName.Password = Variables.password;
docClient.GetDocumentsCompleted += new EventHandler<DocumentsService.GetDocumentsCompletedEventArgs>(getDocumentsCompleted);
docClient.GetDocumentsAsync();
It actually doesn't matter if I pass the credentials or not, I get the same exception. I don't really know what the problem is, maybe it has nothing to do with the authentication. I've read all the articles here on CommunicationException but they couldn't solve my problem.
Any help will be appreciated!
I've finally figured it out! The server uses Basic Authentication and the header is set to "POST" by default. So I needed to modify the Header, set it to "Basic" and add the credentials as well. Furthermore the
CommunicationException: "Server returned an error: Not Found"
always appear if there is any unhandled exception. So you need to debug and check the _innerException for more information.