While integrating for auth api through Alamofire, it gives error.
http://test.salesforce.com/services/oauth2/token
Optional(["Content-Type": "application/x-www-form-urlencoded"])
Param: client_id=3MVG9e2mBbZnmM6lFmND2Ju7xFYp.iaixYWQ7tuDZKWs4Jqs9pxjm3kenjwAqhG28yWavIReD9wkchzFaBcMO&client_secret=8967652660758155787&grant_type=password&password=qwerty%4012&username=xxxx%40yahoo.com
Response:
error = "unsupported_grant_type";
"error_description" = "grant type not supported";
I am getting response through POSTMAN so Is there something I am missing?
Salesforce doesn't support JSON in the access token request; the OAuth 2.0 spec mandates application/x-www-form-urlencoded.
Related
AM currently trying to do token exchange from google to Keycloak, Now am facing this error "error_description": "Missing form parameter: grant_type".
postman body ****
content type****
This is my configuration in postman.
Keycloak setup
You should activate Content-Length in Headers.
I Need API to stop the running application, after some search I've found this API
http://apidocs.cloudfoundry.org/263/apps/updating_an_app.html
if I want to test it with postman how can I obtain token and where should I put it inside postman ?
Edit
i've tried like following with postman
Put
https://[api]/v2/apps/211c82e2-7316-45b6-9ae6-1df4dzz74772/stop
Header
Authorization : bearer <token>
"Content-Type":"application/x-www-form-urlencoded"
I got error:
{
"description": "Unknown request",
"error_code": "CF-NotFound",
"code": 10000
}
Any idea?
To get the token you can run cf oauth-token from the CLI.
You can use that token in Postman by adding an 'Authorization' HTTP header.
E.g.
Authorization: bearer token_you_got_by_running_cf_oauth-token
I am trying to get all the issues with respect to a project by exposing the sentry api hosted on a private server but getting below response even after using basic auth.
{
"detail": "Authentication credentials were not provided."
}
And after generating api key, getting invalid key.
Thanks
You should add this header:
header = {'Authorization': 'Bearer TOKEN'}
to your request.
I have tried using the /requests endpoint with my Uber developer account's owner and developer accounts, but I get this error:
401 unauthorized,
{
"message": "This endpoint requires at least one of the following scopes: request.delegate.tos_accept, request, request.delegate", "code": "unauthorized"
}
My HTTP call is as follows:
POST https://sandbox-api.uber.com/v1.2/requests
Headers:
Authorization: Bearer ACCESS_TOKEN_OF_MY_DEVELOPER_ACCOUNT
Accept-Language: en_US
Content-Type: application/json
Parameters:
{"start_latitude":"21.1741125","start_longitude":"72.8121804","end_latitude":"21.2048986","end_longitude":"72.8386455"}
Whereas I get proper response from /requests/estimate endpoint with the same access token, for the same location parameters.
Please help with this.
The problem is you have not requested the 'request' scope during the oauth authorization process.
I using this call url:
"https://api.instagram.com/v1/tags/cats/media/recent?client_id=MY_CLIENT_ID".
I using client_id because my application type is windows service.
but this url throw this error:
{"meta": {"error_type": "OAuthAccessTokenException", "code": 400, "error_message": "The access_token provided is invalid."}}
what should I do?
Thanks..
you have to authenticate using oauth2 and get access_token and use that to make API calls.
Here is more information:
https://www.instagram.com/developer/authentication/