Yelp API V2.0 have problem to get response .when i send request in yelp API V2.0 with all authentication key and token , i get error missing parameter . if any one have idea regarding Yelp help me
If you get this error:
{"error":{"text":"One or more parameters are invalid in
request","id":"INVALID_PARAMETER","field":"oauth_timestamp"}}
then your timestamp is sometime in the past. You can resolve this by dynamically getting the current time or by setting the timestamp parameter to some arbitrary value in the future.
You got that error because you are not using the keys themselves "The OAuth credentials are invalid" ...oauth_consumer_key=mykey&auth_consumer_secret=mykey...
it should look like this ...oauth_consumer_key=XXXXXXXXXXXXXXXXXXXXX&auth_consumer_secret=XXXXXXXXXXXXXXXXXXXXX...
Have a look at their github https://github.com/Yelp/yelp-api/tree/master/v2/ they have some examples that might help for example on the PHP
// Set your keys here
$consumer_key = "";
$consumer_secret = "";
$token = "";
$token_secret = "";
you should set your keys in between the quotes $consumer_key = "XXXXXXXXXXXXXXXXXXXXX";
Related
I am trying to verify Whatsapp business webhook, codeigniter rest configuration format is set as below
$config['rest_default_format'] = 'json';
And sending the response using the following
$wchalng = $this->get('hub_challenge');
$this->response($wchalng, 200)
When i try to verify webhook, i receive the following error:
The URL couldn't be validated. Response does not match challenge, expected value="391067291", received="\"391067291\""
When I use postman, the result is "391067291" with double quotes, but it seems Facebook requires the result to be without any quotes 391067291.
I tried using:
stripcslashes($this->response($wchalng, 200));
json_decode($this->response($wchalng, 200));
but none of the above worked! I also tried to change from json to html for the rest_default_format without any success.
Any help on how to get rid of the double quotes in codeigniter rest response would be highly appreciated.
After trying different things, finally I was able to get a successful verification.All I needed is to convert the received string into integer to remove the double quotes.
$wchalng = intval($this->get('hub_challenge'));
I'm trying to use a service of DocuSign API in an abap project. I want to send a document to a specific email so it can be signed. But im getting the following error:
"errorCode": "INVALID_REQUEST_PARAMETER",## "message": "The request contained at least one invalid parameter. Query parameter 'from_date' must be set to a valid DateTime, or 'envelope_ids' or 'transaction_ids' must be specified.
I tried the following:
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = l_url (https://demo.docusign.net/restapi/v2/accounts/XXXXXX')
proxy_host = co_proxy_host
proxy_service = co_proxy_service
IMPORTING
client = lo_http_client
lo_http_client->request->set_method( method = 'POST').
CALL METHOD lo_http_client->request->set_header_field
EXPORTING
name = 'Accept'
value = 'application/json'.
CALL METHOD lo_http_client->request->set_header_field
EXPORTING
name = 'X-DocuSign-Authentication'
value = get_auth_header( ). (json auth header)
CALL METHOD lo_http_client->request->set_cdata
EXPORTING
data = create_body( ).
This is my body:
CONCATENATE
`{`
`"emailSubject": "DocuSign REST API Quickstart Sample",`
`"emailBlurb": "Shows how to create and send an envelope from a document.",`
`"recipients": {`
`"signers": [{`
`"email": "test#email",`
`"name": "test",`
`"recipientId": "1",`
`"routingOrder": "1"`
`}]`
`},`
`"documents": [{`
`"documentId": "1",`
`"name": "test.pdf",`
`"documentBase64":` `"` l_encoded_doc `"`
`}],`
`"status": "sent"`
`}` INTO re_data.
The api request to get the Baseurl is working fine. (I know the error is quite specific what the problem is, but i cant find any sources on the docusign api documentation that one of the mentioned parameters should be added to the request)
Thank you in regards
The error message seems to indicate that you're Posting to an endpoint that requires certain query string parameters -- but you're not specifying them as expected in the query string. I'd suggest you check the DocuSign API documentation for the operation you are using, to determine what query string parameters it requires, and then ensure that you're including those parameters in your request URL.
If you can't figure this out using the documentation, then I'd suggest that you update your post to clarify exactly what URL (endpoint) you are using for the request, including any querystring parameters you're specifying in the URL. You can put fake values for things like Account ID, of course -- we just need to see the endpoint you are calling, and what qs params you're sending.
To create an envelope, use
https://demo.docusign.net/restapi/v2/accounts/XXXXXX/envelopes
instead of
https://demo.docusign.net/restapi/v2/accounts/XXXXXX
Thank you for all the answers, i found the mistake. Creating the request wasn´t the problem. I was using the wrong "sending"-method -_-.
now its working :)
lo_rest_client->post( EXPORTING io_entity = lo_request_entity ).
I am manually building a login system to my application using facebook. Following this tutorial I am told to do some get requests to obtain user information. Echoing an returned token I obtain this
(using FILE_GET_CONTENTS() ):
$access_token = "graph.facebook.com/oauth/access_token?client_id=$client_id&redirect_uri=$redirect_uri&client_secret=$client_secret&code=$user_code") :
echoing $access_token:
access_token = CAAKlMMCiHp(...)ZByh3faLzh &expires=5125282
or this for an app_token ("graph.facebook.com/oauth/access_token?client_id=$client_id&client_secret=$client_secret&grant_type=client_credentials") :
echoing $app_token:
access_token = 744(...)90|vZU2(...)e0-s
The last one to obtain the user information that I have to do is this:
$last_one = "graph.facebook.com/debug_token?access_token=$access_token&app_token=$app_token";
Check above that I have to use $access_token and app_token. The problem is that when I echo $access_token what I obtain is literally access_token = xxxx..., including the "access_token" and the "=" sign instead of just the token.
So, when I try to do my last request ($last_one) I have (with variable replacement):
$last_one = "graph.facebook.com/debug_token?access_token=access_token=xxx&app_token=app_token=xxxx";
To avoid this I removed the first "access_token=" and "app_token=" and successfully eliminated the duplicate. Unfortunately I now have access_token=xxx&access_token=xxx because although one is literally for access and another is to the app both are treated as access_token and their echo also explicits "access_token =" as shown above.
My question is if this is supposed to happen and how can I get only the token? I find it kind of ridiculous to have the need of using substr() just to eliminate the first part of the token "access_token =". Am I supposed to reach the token by a getter part of file_get_contents()? And should I include &expires=xxxx of the first token in the last request? Please refer and shortly read the tutorial from "Confirming identities" to understand what is my dilema. I hope I made myself through, thank you very much!
I have a question about Intuit API. I want to connect for the first time with this API. I'm using .NET SDK. I'm going througt this tutorial: http://goo.gl/PzIzoa . I don't know what i have to pass in arguments issuerId and subject (Step 1.b). I left them empty for the first try and I'm catching InvalidTokenException.
What arguments I have to pass to make it work?
Edit:
Thanks for your help, now I'm connecting via your web app.
Now I want to connect using my application. I wrote this code:
string certificateFile = "C:\\OpenSSL-Win32\\bin\\testapp1.crt";
string password = "xxx";
X509Certificate2 certificate = new X509Certificate2(certificateFile, password);
string consumerKey = "xxx";
string consumerSecret = "xxx";
string issuerId = "";
string subject = "";
SamlRequestValidator val = new SamlRequestValidator(certificate, consumerKey, consumerSecret, issuerId, subject);
After calling SamlRequestValidator constructor I'm catching InvalidTokenException. What am I doing wrong? What I have to do to make it work?
Please take a look at the following link.
https://developer.intuit.com/docs/0020_customeraccountdata/007_firstrequest
You can use apiexplorer tool to test these API calls without using devkit.
(It will ensure that your OAuth keys are working fine)
https://developer.intuit.com/apiexplorer?apiname=CustomerAccountData
You can refer the following .Net sample app as well.
https://developer.intuit.com/docs/0020_customeraccountdata/devkits/285.net_sample_app_for_cad_services
Let me know if you get any issue related to this process.
Thanks
When I perform a search by LastUpdatedTime I get "401 Unauthorized Error". Query by CustomerId works fine
Here is my code:
var pq = new PaymentQuery()
{
LastUpdatedTime = new DateTime(2012,12,21),
};
pq.SpecifyOperatorOption(Intuit.Ipp.Data.Qbo.FilterProperty.LastUpdatedTime, FilterOperatorType.AFTER);
var list = pq.ExecuteQuery<Payment>(commonService.ServiceContext);
Application throws Intuit.Ipp.Exception.InvalidTokenException in ExecuteQuery
The SDK does not encode the datetime correctly, so you will need to use DevDefined and deserialize the response with the SDK. Code sample: https://gist.github.com/IntuitDeveloperRelations/6024616
What does the full error look like?
Are you able to do other calls fine with this company using the token sets & realm ID that you have in place?