I tried this example in the console from the https://dev.mailjet.com/ :
curl -s -X POST --user "user:pass" https://api.mailjet.com/v3/REST/send -H 'Content-Type: application/json'
and the result is always
{ "ErrorInfo" : "", "ErrorMessage" : "Unknown resource: \"send\"",
"StatusCode" : 400 }
If I try other get requests, like /contact the result is with success.
Please help
The URL you're using is not the right one. Please change it to https://api.mailjet.com/v3/send.
Please visit the dedicated API guide for our transactional API here https://dev.mailjet.com/guides/#send-transactional-email
Hope it helps.
hAPI coding with Mailjet API!
Related
I have used postman with this curl request
curl -X GET 'https://api.linkedin.com/v2/ugcPosts?q=authors&authors=List({urn:li:organization:77ilp7ense0pbf})&sortBy=LAST_MODIFIED' \
-H 'X-Restli-Protocol-Version: 2.0.0' \
-H 'Authorization: Bearer {AQXONiuOuqTCGgEeH3NJBA9b7A8NPbdS5nFjp7nAxUUBnmVmo53UzamJDksan3WSduiUE6u39J9PJNtRVvLhn}'
I have added {urn:li:organization:77ilp7ense0pbf}, "77ilp7ense0pbf" is my client ID.
I have added 'Authorization: Bearer {AQXONiuOuqTCGgEeH3NJBA9b7A8NPbdS5nFjp7nAxUUBnmVmo53UzamJDksan3WSduiUE6u39J9PJNtRVvLhn}' as my access token.
But still i am getting this error
{
"serviceErrorCode": 65600,
"message": "Invalid access token",
"status": 401
}
Is there anything i missed here ? Or any configuration is wrong. Please let me know to get the company posts by UGC posts. I have to get all my linkedIn posts from my company page. https://www.linkedin.com/company/blenheim-chalcot-it-services-india-private-limited/posts/
Thanks in advance.
To get all posts use https://api.linkedin.com/v2/posts like here and to retrieve some statics about share go here
A backend API generates JIRA-ISSUE ID.
How do I close the jira ticket through REST API calls?
Can somebody help me as to how to proceed with this?
What are the requirements and steps to follow?
first list the next transition id
https://yourServer/rest/api/3/issue/FOO-123/transitions?expand=transitions.fields
and then use your transition id (212) to update
curl -u $JIRA_TOKEN -X POST --data '{ "transition": {"id": "212"} }' -H "Content-Type: application/json" https://yourServer/rest/api/3/issue/FOO-123/transitions?expand=transitions.fields
Hey Guys I'm new to Angular, can somebody help me how to fetch the data and display it in a component with the following details, just a format will help me.
curl -X GET -H "Content-Type: application/json" -H "Authorization:
Token a41d2b39e3b47412504509bb5a1b66498fb1f43a" -H "Cache-Control:
no-cache" "https://api.mywebsite.co.in/v1/mf/?key=118656INF204K01E05"
Thanks in Advance.
if you want get the full response from the api you need to use HttpClient module.
getting full response from api Working example Check this:https://stackblitz.com/edit/angular-64qrhq?file=app%2Fdata.service.ts
using this URL as a reference and attempting token exchange with client ID and secret:
https://developers.onelogin.com/api-docs/1/oauth20-tokens/generate-tokens
I get a 404 error for the URL provided. I'm using:
https://api.us.onelogin.com/auth/oauth2/token
Am I missing something from the docs? Thanks!
The API is working for me. Just curious - are you using the POST method?
Have you tried the CURL example at the bottom of the doc page?
Just to be clear, you need to sub in your shard, which is prob us.
Like
curl -X POST -H "Authorization: client_id:{enteryours}, client_secret:{enteryours}" -H "Content-Type: application/json" -d '{ "grant_type":"client_credentials" }' 'https://api.us.onelogin.com/auth/oauth2/token'
I'm working on an app using Pushbullet's API, but I'm running into odd errors when running through the sample code at https://docs.pushbullet.com/v2/pushes/.
I'm executing the following cURL command (in Windows):
curl -k -u <MY_API_KEY>: -X POST https://api.pushbullet.com/v2/pushes --header 'Content-Type: application/json' --data-binary '{"type": "note", "title": "Note Title", "body": "Note Body"}'
...but it keeps generating the following error:
{"error": {"type":"invalid_request","message":"The param 'type' has an invalid value.","param":"type","cat":"\u003e:3"}}
It also produces this error:
The other commands for the other endpoints in the documentation work fine...it's just this one.
Got any suggestions? Thanks for the help! :)
It looks like windows doesn't support those kinds of quotes on the command line. Here's an example that works:
curl https://api.pushbullet.com/v2/pushes -X POST -u <access token>: --header "Content-Type: application/json" --data-binary "{\"type\": \"note\", \"title\":\"Note Title\", \"body\": \"Note Body\"}"
I think I'm going to try to replace the curl examples with something that has less confusing behavior.
I figured it out - I don't really know why, but the cURL command wasn't working through the DOS prompt, and also wasn't working using the Postman REST client for Chrome, but I got it working in the DHC extension for Chrome. The trick was setting the Authorization header to "Basic", which resolves the Pushbullet access token to some other form, and makes a successful the HTTP request.
Hope this helps someone down the road if they run into this on Windows!