404 not found. Using postman for stripe integration in android studio - android-studio

I added the url for customers, emphemeral keys and payment_intent in the postman, and then i added authorization, body and sent the url request. Customers is working but for emphemeral key and payment_intent, i get the 404 error even though I used all details from stripe documentation
{
"error": {
"message": "Unrecognized request URL (GET: /v1/ephemeral_keys). Please see https://stripe.com/docs or we can help at https://support.stripe.com/.",
"type": "invalid_request_error"
}
}

The /v1/ephemeral_keys only accepts the POST verb.

Related

Unable to ping Authorize.Net webhook

I just started building a webhook following the documentation. I created a sample web api application and published to IIS with a valid url accessible from the internet.
I created a webhook on out authorize.net sandbox account and set the url. I am able to call the POST api method from inside the postman. But when I try to ping the webhook I get error as follow:
https://apitest.authorize.net/rest/v1/webhooks/70884522-6fe8-4e72-9c7e-15bf2b30f778/pings
{
"status": 500,
"reason": "PING_FAILED",
"message": "The ping operation failed with the status code 403",
"correlationId": "5d136ce8-406f-442e-9118-fdde36946d87",
"details": [
{
"message": "Error occured in connecting to the endpoint:http://staging4.dancecompgenie.com/api/Values/Post "
}
]
}
Here is the url on my server.
http://staging4.dancecompgenie.com/api/Values/Post
I am able to successfully call this url in postman and get the result.
I appreciate if you can help me solve the problem.

How to update existing user in Azure AD using Microsoft Graph API

I have added a user in azure ad. Now using graph api I want to update its display name or let say password. I am referring to this guide https://learn.microsoft.com/en-us/graph/api/user-update?view=graph-rest-1.0&tabs=cs
First of all, I am not sure I am using correct URL to update the user but below is what I am using:
https://graph.microsoft.com/v1.0/users/john#<myorg>.onmicrosoft.com
I am passing the userName of the user which I want to udpate in the url. Please let me know if this is not correct.
I am including the OAuth token as bearer token in my request and posting the below json:
{
"accountEnabled": true,
"displayName": "john12"
}
From the above json, I want to change the display name from john to john12. But I am getting below error:
{
"error": {
"code": "Request_BadRequest",
"message": "Specified HTTP method is not allowed for the request target.",
"innerError": {
"request-id": "536fd7c1-db46-4927-9732-169da778811c",
"date": "2019-06-06T04:58:26"
}
}
}
Please can anyone please let me know how can I update the existing user properties. Thanks
Most probably you're not using HTTP method PATCH. I say this looking at the error message Specified HTTP method is not allowed for the request target.
If you use anything other than PATCH, like a POST you will end up getting this error message.
The JSON body for your request looks fine. I tried updating an existing user with similar JSON and sending a PATCH request from Microsoft Graph Explorer and it worked fine.
I could reproduce the same error message that you're seeing when I used a POST or PUT call from Microsoft Graph Explorer.
Although same request URL with same JSON body worked fine once I changed POST to PATCH. Later on querying the user again (GET), I could see that displayName had been updated correctly

Azure GraphAPI getMemberGroups Bad Request error

I am attempting to make the Azure Graph API call getMemberGroups, however I am getting a "400 Bad Request" error in response.
According to the documentation [https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/functions-and-actions#getMemberGroups], the following request should be :
I am using POSTMAN to make the request however I keep getting a "Request_BadRequest" error code.
My POST request is:
Where the red bar is the tenant ID and the blue bar is the object ID of the user.
My headers are:
My body is:
I keep getting the error message:
{
"odata.error": {
"code": "Request_BadRequest",
"message": {
"lang": "en",
"value": "Invalid JSON. The value '------' is not a valid number."
}
}
}
I am not too sure why that is happening, does anyone have any clues?
Since we are posting the json data, you shouldn't use the form-data. For the application/json type data, we should use the raw option to send the data.
How to know the authorization token of the Ad User

Google calendar push notification : Unauthorized webhook call

Currently we are in the process of developing one iPhone application that deals with google calendar. There was need of syncing calendar events to the server side. Everything works fine.
But for push notification , we are following this process
Whenever we post request to :
https://www.googleapis.com/calendar/v3/calendars/email#gmail.com/events/watch
with parameters
"id":Unique string ( channel id) ,
"type": "web_hook",
"address": "https://abc-api.herokuapp.com/user/notifications"
In the header , we are sending
Authorization : **Bearer 'Access_token'**
and content type : json
We already added domain as authorized domain in the google api console
Access_token is user's account access token .
We are getting "Unauthorized webhook call" error.
{
"error": {
"errors": [
{
"domain": "global",
"reason": "push.webhookUrlUnauthorized",
"message": "Unauthorized WebHook callback channel: https://abc-api.herokuapp.com/user/notifications"
}
],
"code": 401,
"message": "Unauthorized WebHook callback channel: https://abc-api.herokuapp.com/user/notifications"
}
}
Anyone here who can help us to solve the issue ?
You might want to check this post, providing solution like verifying if your domain have a valid (not self-signed) SSL license. Also in google-api-php-client GitHub, instead of setting https://example.com/google/push (resulted in Unauthorized WebHook callback channel) or https://www.example.com/google/push (allowed me to successfully open channel, and object has been returned, however webhook has not been fired) as address they tried https://www.example.com/google/push/index.php and worked.
One potential issue is if you're testing in Google's "try it" section of the documentation. It's not stated, but this particular request does not work there.
Otherwise, there are a few things that need to happen with the domain you are supplying in the address. First, you need to make sure its verified in the google developers console for the application you are hitting the api with. Additionally, you need to add the website property to your search console (even if its just an api) and verify ownership.
Also, once you get past the unauthorized address issue, you will get another error requiring a resourceId be supplied.

Square Webhook API Error "Client does not exist"

I have enabled webhooks for my application, and am attempting to make the PUT request for the events I am interested in.
The response I get is a 404 with this body:
{
"type": "not_found",
"message": "Client does not exist"
}
I have attempted to issue a GET and the result is the same.
Endpoints I have tried include:
https://connect.squareup.com/v1/me/webhooks
https://connect.squareup.com/v1/BP0C3P3DS975P/webhooks
All other v1 and v2 API endpoints seem to be working.
The merchant authorized the application with these scopes: MERCHANT_PROFILE_READ PAYMENTS_READ SETTLEMENTS_READ BANK_ACCOUNTS_READ CUSTOMERS_READ ORDERS_READ
I think I've looked through the docs very carefully, but I can't seem to figure this one out.
Webhooks are enabled on a per-app basis. Please confirm you have enabled Webhooks for this specific application:
Webhooks Configuration
Also, you should submit API requests to the location-specific endpoint: /v1/{location_id}/webhooks

Resources