I am using following proxy API to authenticate my user details from sandboad
curl -i -H 'Content-Type: application/x-www-form-urlencoded' -X POST 'https://beachbody-test.apigee.net/oauthvalidate?grant_type=password' -d 'grant_type=password&username=rsekhar&password=xxxxxx'
It gives me following error
{ "fault": { "faultstring": "Invalid client identifier {0}", "detail": { "errorcode": "oauth.v2.InvalidClientIdentifier" } } }
If I execute following url from command line http://api.usergrid.com/beachbody/SANDBOX/default
It authenticates my user and return me with valid user details
curl -X POST -H "Content-Type: application/json" -d '{"grant_type":"password", "username":"rsekhar", "password":"XXXXXX"}' "http://api.usergrid.com/beachbody/SANDBOX/default"
Response:
{ "action" : "post", "application" : "b9f23e40-3612-11e5-9987-3fe4681a72f2", "params" : { }, "path" : "/defaults", "uri" : "https://api.usergrid.com/beachbody/sandbox/defaults", "entities" : [ { "uuid" : "5373f2ba-7af6-11e6-8d6b-cf2668611110", "type" : "default", "created" : 1473910906203, "modified" : 1473910906203, "grant_type" : "password", "metadata" : { "path" : "/defaults/5373f2ba-7af6-11e6-8d6b-cf2668611110" }, "password" : "XXXXX", "username" : "rsekhar" } ], "timestamp" : 1473910906183, "duration" : 38, "organization" : "beachbody", "applicationName" : "sandbox" }
Below you can find my serviceCallout Policy
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <ServiceCallout async="false" continueOnError="false" enabled="true" name="AuthenticateUser"> <DisplayName>AuthenticateUser</DisplayName> <Properties/> <Request clearPayload="true" variable="authenticate.request"> <IgnoreUnresolvedVariables>false</IgnoreUnresolvedVariables> </Request> <Response>authenticate.response</Response> <HTTPTargetConnection> <URL>http://api.usergrid.com/beachbody/sandbox/defaults</URL> <!--<URL>http://uatapi-club.beachbody.com/login/</URL>--> <!-- <URL>https://login.apigee.com/login</URL>--> <!-- <SSLInfo> <Enabled>true</Enabled> <ClientAuthEnabled>true</ClientAuthEnabled> <KeyStore>myKeyStore</KeyStore> <KeyAlias>myKeyAlias</KeyAlias> </SSLInfo> --> </HTTPTargetConnection> </ServiceCallout>
Kindly advise me on this
Solved! Go to Solution.
Issue was resolved with username and password, we have to use app basic authentication headers then only it will work
Issue was resolved with username and password, we have to use app basic authentication headers then only it will work
User | Count |
---|---|
5 | |
2 | |
2 | |
1 | |
1 |