Authorization
Description
The auth method is used to fetch an authorization token A token is a piece of data that has no meaning or use on its own, but combined with the correct tokenization system, becomes a vital player in securing your application. Token based authentication works by ensuring that each request to a server is accompanied by a signed token which the server verifies for authenticity and only then responds to the request.. This token is required on all other endpoints.
Endpoint
https://api.buy.broadsign.com/v1/auth
HTTP Method
POST
Request Body
Request Body Parameters
Parameter | Description | Type | Required (R) or Optional (O) |
Username | Unique user name. | string | R |
Password | Password associated with the user. | string | R |
Request Body Example
Copy
POST https://api.buy.broadsign.com/v1/auth
{
"Username": "myusername",
"Password": "mypassword"
}
Response Body
Response Body Parameters
Parameter | Description | Type |
token | Unique authorization token. | string |
Response Body Example
Copy
{
"token": "mytoken"
}
Example
Copy
"/auth" : {
"post" : {
"consumes" : [ "application/json" ],
"produces" : [ "application/json" ],
"parameters" : [ {
"in" : "body",
"name" : "AuthRequest",
"required" : true,
"schema" : {
"$ref" : "#/definitions/AuthRequest"
}
} ],
"responses" : {
"200" : {
"description" : "200 response",
"schema" : {
"$ref" : "#/definitions/AuthResponse"
}
},
"400" : {
"description" : "400 response"
}
}
}
"AuthRequest" : {
"type" : "object",
"required" : [ "Password", "Username" ],
"properties" : {
"Username" : {
"type" : "string"
},
"Password" : {
"type" : "string"
}
}
}
"AuthResponse" : {
"type" : "object",
"required" : [ "Token" ],
"properties" : {
"Token" : {
"type" : "string"
}
}
}