-
Notifications
You must be signed in to change notification settings - Fork 0
/
token.txt
28 lines (21 loc) · 937 Bytes
/
token.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJZCI6IiIsImV4cCI6MjcwMzIzNDE2OSwiaWF0IjoxNTAzMjM0MTY5fQ.ioeDO8LitFwTQbCMboXr1xJHLrq5sFRs4BGxZi9HZHE
how to use:
Add authorization header to every requests
Authorization Bearer {{token}}
$.ajax({
type: "POST",
url: "http://localhost:8000/v1/auth",
// headers: "Authorization Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJZCI6IiIsImV4cCI6MjcwMzIzNDE2OSwiaWF0IjoxNTAzMjM0MTY5fQ."+
// "ioeDO8LitFwTQbCMboXr1xJHLrq5sFRs4BGxZi9HZHE",
data: JSON.stringify({ phone_no: "091289713983" })
})
.done(function( msg ) {
console.log(msg);
if(msg=='ok'){
habari='Your new pin has been sent to '+ phone;
// document.getElementById('simu').value='';
}else{
habari="Invalid phone number ";
}
// $("#onyesha").html(habari);
});