Welcome
Login
Sign up
Home
Solutions
Forums
How can we help you today?
Enter your search term here...
Search
Login
or
Signup
to submit a new ticket
Check ticket status
Start a new topic
Discussions
Kinvey Forums
Business Logic
Basic Authentication in Business Logic
M
Michael
started a topic
over 7 years ago
Is there support for using basic authentication with a 3rd-party API in business logic?
1 Comment
M
Michael
said
over 7 years ago
Yes, basic auth is supported as per the sample below:
request.get({'uri': 'http://someurl.com/api/record/1'
'auth': {
'username':'your_username',
'password':'your_password'
}
}
,function(error, res, body){
if (error){
logger("error");
response.error = (error);
} else {
logger("success");
response.body = JSON.parse(body);
response.complete(res.status);
}
});
The username and password values will be automatically base64-encoded.
Login
or
Signup
to post a comment
More topics in
Business Logic
How do I access query string values for GET and DELETE requests?
How do I cascade delete entities from related collections?
All BL failing with Violation Error
How do I send push notifications?
Whenever I try to query by _id, I get zero results
receiving SOCKETTIMEDOUT when requesting external http response
Unique Constraints on a collection column?
Need some help with grouping
Accessing Endpoint from Collection Hook
See all 342 topics
Michael